Skip to content

Thank you for Flapi and request for guidance #17

Description

@LL1yt

Dear Flapi developers,

First and foremost, I want to express my sincere gratitude for developing Flapi. This library has the potential to greatly enhance workflow automation in FL Studio, and I'm excited about its possibilities.

I'm working on a project to automate the creation of tracks in FL Studio based on a JSON structure. However, I've encountered some difficulties as I'm not sure about the correct way to use Flapi for this purpose. My current approach seems to be incorrect, as I've noticed that Flapi doesn't have transport, channels, plugins, patterns, or playlist modules that I initially assumed it would have.

from flapi import transport, channels, plugins, patterns, playlist
import json


def create_track_from_json(json_data):
    data = json.loads(json_data)

    
    transport.set_bpm(data["tempo"])

Could you please provide some guidance on how to properly use Flapi to achieve the following tasks:

  1. Setting the project tempo
  2. Creating new channels
  3. Adding instruments (plugins) to channels
  4. Creating patterns and adding notes to them
  5. Adding patterns to the playlist
  6. Setting plugin parameters
  7. Adding and configuring effects

Here's a snippet of the JSON structure I'm working with:

{
    "tempo": 140,
    "channels": [
        {
            "name": "Kick",
            "instrument": "FPC",
            "patterns": [
                {
                    "name": "Main Kick",
                    "notes": [
                        {"time": 0, "note": 36, "duration": 0.25, "velocity": 100},
                        {"time": 1, "note": 36, "duration": 0.25, "velocity": 100}
                    ]
                }
            ],
            "effects": [
                {"name": "Fruity Compressor", "settings": {"threshold": -6, "ratio": 4}}
            ]
        }
    ]
}

Any examples or explanations of the correct Flapi usage for these tasks would be immensely helpful. I'm eager to learn and make the most of this fantastic library.

Thank you again for your hard work on Flapi, and I look forward to your guidance.

PS and yes, LLM helped me in writing this)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions