Git Product home page Git Product logo

Comments (6)

ttaschke avatar ttaschke commented on July 18, 2024 1

@demberto

could you please tell me the exact location where FL Studio is installed on Mac (by default)?

Here is an example of a stock sample path in Mac OS:
/Applications/FL Studio 20.app/Contents/Resources/FL/Data/Patches/Packs/Legacy/Drums/Dance/Kick Basic.wav

I am on Mac and wanted to try fixing this for Mac users, but it seems that the create_zip() functionality is gone with 2.0.0?

from pyflp.

demberto avatar demberto commented on July 18, 2024 1

create_zip() functionality is gone with 2.0.0

I plan to create a separate CLI utility for that purpose, since such a platform and software dependant functionality being in a library doesn't make much sense. Also I plan to make it way more robust than it currently is, much more like FL's actual implementation which looks through current folder, folders added in the sample browser.

I also plan to add my own stuff like fallback paths, conflct resolution etc. Thank you for getting back btw, I will ping you to notify when I create a repo for the CLI.

from pyflp.

demberto avatar demberto commented on July 18, 2024

Uh yea, that part was specifically coded to run on Windows, Frankly, it never occurred to me that it would definitely fail on Mac or other platforms. Unfortunately there is no direct workaround for this, but you can write your own function which collects all sample paths and creates a zip.

Simply iterate over all the channels in project to get their sample_path like this:

from pyflp import Parser

# Uncomment and fill in the path to your FL installation dir below
# I haven't used Mac so don't know where it gets installed.
# FL_INSTALL_DIR: str = ""

paths = []

project = Parser().parse(file_name)
for channel in project.channels:
    if channel.sample_path is not None:
        if channel.sample_path.startswith("%FLStudioFactoryData%"):
            paths.append(channel.sample_path.replace("%FLStudioFactoryData%", FL_INSTALL_DIR, 1)
        else:
            paths.append(channel.sample_path)

You will need to write in the code for adding these samples and the FLP to a ZIP yourself. I am sorry I missed such a painfully obvious thing. I am not entirely sure how folders on Mac work, could you please tell me the exact location where FL Studio is installed on Mac (by default)? Can its contents be accessed like if it is a folder (since I read Mac uses .app to store apps)?

from pyflp.

demberto avatar demberto commented on July 18, 2024

@ttaschke Can you send me over an FLP with a stock sample loaded in it? I want to inspect the sample path stored.

from pyflp.

ttaschke avatar ttaschke commented on July 18, 2024

Here is a FLP saved from the "Basic with Limiter" template
stock_sample.flp.zip

Example sample path for the first channel:
/Applications/FL Studio 20.app/Contents/Resources/FL/Data/Patches/Packs/Legacy/Drums/Dance/Kick Basic.wav

from pyflp.

demberto avatar demberto commented on July 18, 2024

Thanks for confirming, FL uses the exact same paths as it would have used on Windows; it uses %FLStudioFactoryData for /Applications/FL Studio 20.app/Contents/Resources/FL on Mac

from pyflp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.