• Balwyn

    Here is way to get a bit more out of the soundfont generators using NRPN to address them. I've had this info for a very long time and can't seem to find where it came from.
    You will need to change the path to your soundfont in [else/sfont~] and use the sf2-presets-reader.pd to create soundfont.txt if you want to use choose-sf2.pd.
    Probably not that useful, just a bit of fun

    Edit: I found the source of this info in the soundfont 2.04 spec

    sf2-toy.zip
    image.png

    posted in patch~ read more
  • Balwyn

    I've just updated choose-sf2-example.pd in the zip in the original post because it was incorrectly wired and triggered, causing the previous index and current bank to be sent immediately before the current index and current bank often causing an error. I noticed it when I connected a print object to else/sfont~ right outlet
    choose-sf2-example.pd

    posted in patch~ read more
  • Balwyn

    @porres I removed else from my startup preferences, declared -lib else in a patch and else/sfont~ now loads successfully

    posted in patch~ read more
  • Balwyn

    @porres I've just reinstalled Plug Data and sfont~ works fine there

    posted in patch~ read more
  • Balwyn

    @oid
    I really should have explained about the $0 for those who may be following:

    The abstraction choose-sf2.pd is a dynamic patching patch that generates a bang connected to a message containing an index number of the lines of soundfont,txt and then connected to a send $0-result, this is the line number to read in soundfont.txt when the item bang is clicked, this is passed to $0-chosen

    The format of the items in soundfont.txt was for simplicity in sorting the preset index and bank together with the name following. (the presets in a soundfont2 file are often very unsorted)
    choose-sf2-example.pd shows how to retrieve the index, bank & name

    The abstraction choose-sf2.pd is instantiated on the choose-sf2-example.pd with one argument $0, this offers a link back from choose-sf2 to choose-sf2-example. The send $0-chosen in choose-sf2 can then be received by the $0-chosen in choose-sf2-example.

    This already seems too wordy and now I'm confused

    posted in patch~ read more
  • Balwyn

    @oid
    It could easily be made into an abstraction.
    comprising the reader and the chooser, just need to decide the neatest approach, but yes it was just an exercise to see if it was possible

    posted in patch~ read more
  • Balwyn

    @porres actually I am having a problem getting sfont~ to work on my computer
    win 10
    pd 0.55
    brand new else deken installed
    library loaded at pd statrt
    other parts of else work fine
    the same is true in plug data
    image.png

    posted in patch~ read more
  • Balwyn

    15 or so years ago I came across a vb script to extract a presets list from a soundfont2 file, which I adapted to use in various VB.net Fluidsynth projects.
    Now that Pure Data has the file handle object to read binary files I decided to give it a go in Pd on Windows 10.
    I have also tried it using linux and it seems to work with the latest portable version.
    Edit: Thursday 22nd August 2024, I've just updated choose-sf2-example.pd in the zip because it was incorrectly wired an triggered
    sf2-presets-reader.zip
    contains:
    sf2-presets-reader.pd to create soundfont.txt
    choose-sf2-example.pd to launch choose-sf2.pd and show index, bank and name extraction from [r $0-chosen]
    choose-sf2.pd
    soundfont,txt contains the presets from a soundfont I use SGM-V2.01.sf2 (236MB), this will be overwritten with your choice.

    My preferred soundfont player to use with Pure Data is RGC-Audio SFZ.dll or SFZ+.dll loaded in @spacechild1 very excellent vstplugin~

    Other options are Qsynth via midiout
    Fluidsynth,exe via midiout launched with motex/system

    Warning Purr-Data will not open sf2-presets-reader.pd because it does not have the file object.

    Method;
    open the soundfont2 file;
    then look for phdr by searching backwards;
    one byte at a time from the end of the file and look for p;
    then see if the remainder from route is hdr;
    then forwards 38 bytes for each instrument preset;
    to retrieve bank, index and name until EOP tag;
    send to text: (bank as integer, index / 1000 added to bank) and name as symbol;
    ;
    then sort in order:- text define [sort(;
    ;
    next write the text to soundfont, txt;

    Cheers
    Balwyn

    image.png

    posted in patch~ read more
  • Balwyn

    Here is the way I did it using key and keyup
    However filtering key numbers may vary with different keyboard layouts
    computer-keys-to-notes.zip

    posted in technical issues read more
  • Balwyn

    @weuoimi apparently the [adsr] has been altered for the tutorial, there are direct connections instead of send and receives
    see below
    I recreated pm-osc from the tutorial and used this adsr and your dx7 works
    image.png

    posted in technical issues read more
  • Balwyn

    seb-harmonik.ar oops, yes your right of course

    posted in technical issues read more
  • Balwyn

    you need to have the note-off value 0 to turn off the note, >0 is filtering it out
    I do it this way.
    Capture.PNG

    and rather than -1 the poly index, set the clone index to start at 1 with the -s flag

    image.png

    posted in technical issues read more
  • Balwyn

    By changing the 1 to 100 the jpeg looks as good as the tiff if not better and is much smaller in size

    posted in pixel# read more
  • Balwyn

    The preset file is in C:\Program Files\Purr Data\bin\css folder (on windows 10)

    I was able to drag solarized_inverted.css onto the desktop and edit ,box_text to #ff6600 save and drag back to the css folder for the following result.

    I personally wouldn't recommend this approach as I would imagine when updating Purr Data the .css file will be overwritten and possibly updated with new fields

    I tried to make the purrdata folder read/writeable but it just kept reverting back to read-only

    image.png

    posted in tutorials read more
  • Balwyn

    I think you may need to use a message box to this, I dont believe you can put a comma in a list box
    use messages with add2 and addcomma commands
    image.png

    posted in technical issues read more
  • Balwyn

    Hi
    I thought I would have a go
    maybe this might help
    Cheers
    Balwyn
    random-read.zip

    image.png

    posted in technical issues read more
  • Balwyn

    To change the contents of a message box, use the 'set' message
    image.png

    posted in extra~ read more
  • Balwyn

    You could write the values via a sinesum message to an array
    image.png

    posted in technical issues read more
  • Balwyn

    Another way when patches disappear off screen on windows 10, is to hover over the Pd icon on the task bar and right click on the missing patch's large icon title bar then click maximize, then drag down the maximized title bar to restore its size.
    The missing patch appears as a blank patch on the task bar icon.
    image.png

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!