• whale-av

    @PLDS "\" is an escape character....... https://en.wikipedia.org/wiki/Escape_character
    Older versions of Pd didn't display them and they could not be typed.
    (This forum behaves in a similar manner..... I had to escape the backslash above to make it display)

    It says.... what follows... $1 in the message shown in the screenshot below... is a literal string rather than a variable or a special character.

    But since some version of Pd (about 0.51) they can be typed, so you can do this......

    Capture.JPG

    Which is slightly more elegant... but also much easier......
    David.

    posted in technical issues read more
  • whale-av

    @cfry You can chain [list split 2]'s.... middle outlet of each to the inlet of the next + left outlets in parallel ..... so as to have longer name/value lists on each line.

    And also If you use [route symbol] with just the one argument ( multiple [route symbol] objects in parallel ) it can be updated through the right inlet if necessary.
    David.

    posted in technical issues read more
  • whale-av

    @cfry Might help...... no-comma.zip
    Will remove commas from e.g.
    A, 3;
    B, 6;
    etc.
    .... but depends on the lines being always of 2 elements.
    [text define] seems to display the data very differently in 0.55 and 0.50.... but results are the same...
    David.
    Capture.JPG

    posted in technical issues read more
  • whale-av

    @KoaN I have had a bit more luck (as I learn about batch files) creating the two instances.....
    https://forum.pdpatchrepo.info/topic/15681/do-different-instances-of-pure-data-run-in-different-threads/5
    David.

    posted in technical issues read more
  • whale-av

    @jamcultur Batch files....:expressionless:
    Tricky.
    A path with spaces must be contained within inverted commas ""
    Putting inverted commas around the executable name e.g. "pd.exe" opens the installed program and not the one that the path has been set to.

    I have finally managed to set flags for each instance....... twice.zip
    The second.bat can be included in pd_twice.bat but I am finding it easier to keep them separate for now for testing.

    It seems that trying to set midi device numbers in the second instance stymied my previous efforts.

    But here that is fixed and working..... pd-twice.zip

    Flags here....... http://msp.ucsd.edu/Pd_documentation/resources/chapter3.htm#s3.4.1
    ..... so each instance could use a different audio or midi device determined in the batch file...:smile:
    David.

    posted in technical issues read more
  • whale-av

    @jamcultur Strange behaviour.
    Yes, you can start a second instance. A batch file will do that.....

    start "C:\Program Files (x86)\pd\bin\pd.com" start C:\Users\"David"\Desktop\PDMusic\minx\minx_run.pd
    start "C:\Program Files (x86)\pd\bin\pd.com" start C:\Users\"David"\Desktop\PDMusic\minx\minx_run.pd
    exit
    

    Change the path to your Pd location. Pd.com or Pd.exe shouldn't matter.
    The above code will open the same patch twice in different instances. You can open 2 different patches of course.

    Windows assigns processes to threads automatically.... different threads I am pretty sure. There might be a way to ensure that but you would need to copy the Pd binary and and rename the copy probably.

    A second instance will start with different sockets (Pd<>Wish)so they will be completely separate.
    When Pd opens it will have exclusive access to midi and audio pins set in its settings... so the second instance will not get access. You will have to use [netsend] to transfer data between them.

    I have tried using command line flags to set each instance to use different devices... no luck so far.
    You would have to set audio and midi for the second instance after opening.
    David.

    posted in technical issues read more
  • whale-av

    For anyone who can help..... the patch is here...... https://forum.pdpatchrepo.info/topic/13555/picodrumz-extremely-simple-drum-module
    Personally I think it needs a better ADSR than the simple [line~] but maybe that's a matter of taste.
    Changing [the message to line to [1, 0 2000( and the [pow 4] below to about 50 works better for me.
    With a syncopated rhythm triggered manually the pitch seems to vary, but I think that's psychoacoustic...
    But it could be the [phasor~] fm though as you say...?
    Very hard for me to be sure.
    David.

    posted in technical issues read more
  • whale-av

    @mezko The list-abs library has an abstraction for this... list-inter.zip
    It might produce the same lists as @oid's patch. I have not tested.
    I imagine that it will do what you are looking for if the correct lists are applied to the second and third intets.
    David.
    Capture.JPG

    posted in technical issues read more
  • whale-av

    @KoaN Thank you for posting what you have discovered. It will surely help someone in the future.

    In windows you can start 2 instances of Pd.... one for audio and one for midi.... which can help as although the audio settings do affect the midi lag you can set one of the instances to run with a tiny buffer that would cause audio dropouts..... but use that instance purely for midi.
    This can be done in other os's too.

    The 2 instances can then communicate control rate messages using [netsend] and [netreceive].
    A steep learning curve but you seem to be advancing rapidly.

    The instances can be opened with a pre determined setup using command line flags.... http://msp.ucsd.edu/Pd_documentation/resources/chapter3.htm#s3.4.1

    Here is an example of a batch file that should achieve this.....

    start "C:\Users\David\Desktop\Pd Vanilla\pd-0.55-2.msw\pd-0.55-2\bin\pd.exe -noaudio -midiindevice 2 -midioutdevice 2" start midi_patch.pd
    start "C:\Users\David\Desktop\Pd Vanilla\pd-0.55-2.msw\pd-0.55-2\bin\pd.exe -r 44100 -asio -nomidi -audioindev 9 -audiooutdev 9 -inchannels 18 -outchannels 22 -audiobuf 2 -blocksize 64 -callback -nosleep" start audio_patch.pd
    exit
    

    The paths will be wrong for your computer, so will need to be changed, and the command line flags will be wrong for your sound card, and probably for the midi devices too. For the sound card and midi devices you should first open your patch and open the Media AudioSettings and Media MidiSettings and write down the device numbers and settings for those found on your system as Ps starts up.
    Then create an audio patch (-nomidi) and a midi patch (-noaudio) and change the command flags to match your setup for each.

    BUT:exclamation: I cannot (so far) get the flags to work in a batch file opening 2 instances (works fine for one instance so it is my batch programming problem).
    So copy the code above into a simple text editor like notepad, save it as e.g. "pd_twice.bat" and then edit it to match your Pd binary location and the Pd files you want to load to each instance. Once the 2 instances are open set the audio and the midi for the instances to something like this and do not turn on DSP for the midi instance.......
    Keep the batch file with the Pd files you are loading in the same folder.
    Capture.JPG

    Of course your settings for the audio and the midi instances will be different..... different devices, different delay for audio.... but the midi instance can have the delay set to 1 (or maybe even 0) as it will not be running any audio.
    As @jameslo says above...... in Pd the "Delay" setting is the buffer for communication with the sound card.
    David.

    posted in technical issues read more
  • whale-av

    @KoaN Well done getting it to work... and welcome to the forum.
    Pd will introduce a small delay. The "control" messages... the non-audio messages like midi... are processed in between the audio blocks. The standard block in Pd is 64 samples.
    That gives a latency of about 1.45 milliseconds. If you move one and a half feet away from another musician you hear what they play one and a half milliseconds later..... so that latency is not really noticeable.
    It could be that you have a large audio buffer set for your sound card. On a computer one thing has to finish before another can be processed and audio has priority. Try to keep buffers as small as possible. If you make them too small you will start to get clicks as the computer fails to process audio in time... so it's a compromise.
    With a pro soundcard with good drivers you should be able to reduce the buffer to 128 samples or maybe even less. Using the computer on-board sound card you will need a much bigger buffer to avoid clicks and so some noticeable latency.

    You are unlikely to get help here with those exact plugins..... as someone would have to have purchased them. But other forums dedicated to plugins might well give you some pointers.
    David.

    posted in technical issues read more
  • whale-av

    @porres Wow! Thank you to all the contributors..
    David.

    posted in news read more
  • whale-av

    @Balwyn Personally I wouldn't bother with $0 as the clones and nested clones can have more arguments like this......
    this.zip

    Edit... I have not passed on an argument for the first clone.... so 20 messages received....obviously incorrect.... but no time to fix it now. But easily doable...

    David.
    Capture1.JPG

    posted in technical issues read more
  • whale-av

    @impression All clones are automatically assigned $1..... normally from 0 but here starting at 1.....
    Clone is [clone -s 1 6voices_part 800 800]
    Capture.JPG
    Put a [receive] inside the receiving abstraction and [route] your message to the correct abstraction using [route $1]

    The message will be e.g. [6 cutoff 0.378(
    Where "cutoff 0.378" will be received at the outlet of [route $1] by the abstraction number 6.
    Sent to [s curve] (in this case)......
    David.

    posted in technical issues read more
  • whale-av

    @impression Good news..!
    Yes, the MrPeach objects take care of string, float etc formats without us needing to get involved in such details.. They are very useful.
    David.

    posted in I/O hardware diyread more
  • whale-av

    @impression If it is definitely sending then tcp and udp should work if you have specified the same port and the same format (tcp or udp) for both the send and receive..
    If you put a [print] on the left outlet of [netreceive] you should see some data arrive.
    Assuming you are not trying to receive on another (second) RPI, in which case you will need to tell the GPIO RPI the IP address of the second RPI as well as the port.
    David.

    posted in I/O hardware diyread more
  • whale-av

    @atux You can try that....... pd2py_v2.pd
    Does it work?
    If not then post your Python code and someone will tell you why not.
    David.

    posted in technical issues read more
  • whale-av

    @willblackhurst If you look at the help file for [tabread4~] you will see that correct interpolation requires guard points added to the array so that interpolation is performed correctly as [phasor~] wraps around the end of the array.
    Your patch doesn't glitch between the array copies, but it does as [phasor~] wraps at the end of the 3rd copy, or where you chop into the array adjusting the clip length percentage.
    @lacuna made a handy patch to add guard points automatically.... https://forum.pdpatchrepo.info/topic/14301/add-delete-guard-points-of-an-array-for-4-point-interpolation-of-tabread4-ect
    I suppose that if you want to adjust the playback length then you would need to copy a percentage of the array to a new array, and then add the guard points.
    David.

    posted in patch~ read more
  • whale-av

    @jameslo Yes, it seems to work with the $0 inside or at the end of the name....:expressionless:
    David.

    posted in technical issues read more
Internal error.

Oops! Looks like something went wrong!