Reduce latency when tabplay~ right after tabwrite~
@dimagimburg You might find that there are adjustments possible for your computer soundcard.... and if so there will be some help with latency on Google.
The Pd audio settings will help if your soundcard is capable. Generally very low latency is only possible in windows with Asio. OSX has low latency built in.
A built in sound card might not be asio capable.
Leave the buffer (Block size) at 64 and reduce the Delay (msec) setting in Pd as low as possible. If you cannot save the setting, or Pd audio hangs then increase the delay again. Sometimes Pd gets permanently stuck. If that happens open this patch.....
save the audio settings, re-open Pd and try again with the best (lowest) setting you managed the last time.
Zero latency is impossible, but a few milliseconds will be inaudible.
The Harmonizer: Communal Synthesizer via Wifi-LAN and Mobmuplat
The Harmonizer: Communal Synthesizer via Wifi-LAN and Mobmuplat
The Harmonizer is a single or multi-player mini-moog synthesizer played over a shared LAN.
(credits: The original "minimoog" patch is used by permission from Jaime E. Oliver La Rosa at the the New York University, Music Department and NYU Waverly Labs (Spring 2014) and can be found at: http://nyu-waverlylabs.org/wp-content/uploads/2014/01/minimoog.zip)
One or more players can play the instrument with each player contributing to one or more copies of the synthesizer (via the app installed on each handheld) depending on whether they opt to play "player 1" or "player 2".
By default, all users are "player 1" so any changes to their app, ex. changing a parameter, playing a note, etc., goes to all other players playing "player 1".
If a user is "player 2", then their notes, controls, mod-wheel etc. are all still routed to the network, i.e. to all "player 1"'s, but they hear no sound on their own machine.
There are 2 pages in The Harmonizer. (See screenshots below.)
The first page of the app contains all controls operating on a (more or less) "meta"-level for the player: in the following order (reading top-left to bottom-right):
pl2: if selected (toggled) the user is choosing to play "player 2"
mot(ion): triggers system motion controls of the osc1,2&3 levels (volume) based on the accelerometer inside the smartphone (i.e as you twist and turn the handheld in your hand the 3 oscs' volumes change)
rate: how frequently should the handheld update its accelerometer data
slimit: by how much should the app slow down sending the (continuous) accelerometer data over the network
presets: from 1 to 5 preset "save-slots" to record and reload the Grid 1 and Grid 2 settings that are currently active
S: save the current Grid1 and Grid2 selections to the current "save slot"
L: load the currently selected preset into both Grids
">>": go the the next page (page 2 has the reverse, a "<<" button)
Grid 1: the settings, in 4 banks of 3 parameters per-, which are labeled top-down equating to left-right
Grid 2: the same as Grid 1, but with a different set of parameters
The second page comprises:
the 2-octave keyboard (lower notes on top),
a 9-button octave grid (which can go either up or down 4 octaves),
a quick-preset grid which loads one of the currently saved 5 presets
the "<<" button mentioned above, and
both a mod and pitch-bend wheel (as labeled).
All players install Mobmuplat;
Receive The Harmonizer (in the form of a .zip file either via download or thru email, etc.)
When on your smartphone, click on the zip file, for example, as an attachment in an email.
Both android and iphone will recognize (unless you have previously set a default behavior for .zip files) the zip file and ask if you would like to open it in Mobmuplat. Do so.
When you open Mobmuplat, you will be presented with a list of names, if in android click the 3 dots in the top right of the window and on the settings window , click "Network" Or on an iphone click "Network" just below the name list;
On the Network tab, click "LANDINI".
Switch "LANDINI" from "off" to "on".
(this will allow you to send your control data over your local area network with anyone else who is on that same LAN).
From that window, click "Documents".
You will be presented again, with the previous list of names.
Scroll down to "TheHarmonizer" and click on it.
The app will open to Page 1 as described and shown in the image above.
Enjoy with Or without Friends, Loved, Ones, or just folks who want to know what you mean "is possible" with Pure Data )!
Theories of Thought on the Matter
My opinion is:
While competition could begin over "who controls" the song, in not too great a deal of time, players will see first hand, that it is better (at least in this case) to work together than against one another.
If any form of competition emerges in the game, for instance loading a preset when a another player was working on a tune or musical idea, the Overall playablilty and gratitude-level will wain.
However, on the other hand, if players see the many, many ways one can constructively collaborate I think the rewards will be far more measurable than the costs, for instance, one player plays notes while the other player plays the controls.
p.s. my thinking is:
since you can play solo: it will be fun to create cool presets when alone then throw them into the mix once you start to play together. (Has sort of a card collecting fee ).
This was just too easy Not to do.
It conjoins many aspects of pure data together (I have been working on lately (afterward: i did this app a long time ago but for some reason and am only now thinking to share it) both logistical and procedural into a single whole.
I think it does both quite well, as well as, offer the user an opportunity to consider or perhaps even wonder: What is 'possible'?"
Always share. Life is just too damn short not to.
markovGenerator: A music generator based on Markov chains with variable length
This is one of the early projects by @Jona and me. Happy to finally release it.
Generates music from learned material using Markov chains. It is polyphonic, plays endlessly and supports Markov chains with variable length.
- Record midi notes or load midi files
- Make Markov system
Record midi notes or load midi files
Until you reset the memory, each new recording will be added to the memory. The recorded material is seen as a loop, so that the last note is followed by the the first note, for endless play. markovGenerator handles recording midi and loading midi files differently: When you record midi, it will record notes according to the midi clock every sixth midi tick. This is defined in the counter in [pd midiclock]. So that way, breaks are being recorded and the rhythm is preserved. When loading midi files, no breaks are being recorded, the notes are just recorded in order, so the rhythm will be lost. In any case, simultaneous notes will be recorded as chords, so polyphony is preserved.
Make Markov system
Set markovOrder to specify the length of the Markov chain. The higher the order, the more musical information will be kept, the lower the order, the more random it gets. You can use soundFilter and channelFilter to only use notes of the specified sound or channel. This is especially useful when working with midi files. Note that if there are no notes of the specified sound or channel, the Markov system will be empty and nothing will be played. Set the filters to zero to disable them. If you change the settings for the Markov system, click makeMarkov again for them to take effect. You can make new Markov systems with different settings out of the same recorded material over and over again, even when playing. If you record additional notes, click makeMarkov again to incorporate them into the Markov system.
While playing, you can change the note length, sound and midi out channel. Set soundOut and channelOut to zero to use the sound and channel information of the original material. Playing starts with the Markov chain of the last recorded notes, so the first note might be played first.
Use the markovAll section on the right to control all Markov channels at once. Here you can also set tempo, swing and midiSync, and you can save the project or load previous projects.
If it does not play, make sure that
- you recorded some notes,
- you hit the makeMarkov button,
- soundFilter and channelFilter are not set to values where there are no notes. Try setting the filters to zero and hit makeMarkov again.
About the Markov system:
You can see the Markov system of each Markov channel in [text define $0markov]. Notes are stored as symbols, where the values are joined by "?". A note might look like 42?69?35?10 (pitch?velocity?sound?channel). Chords are joined by "=". A chord of two notes might look like 40?113?35?10=42?49?35?10. Notes and chords are joined to Markov chains by "-". The velocity values are not included in the chains. Sound and midi channel values are only included, if soundFilter or channelFilter are off, respectively. Markov chains of order three may look like 42?35?10-36?35?10=42?35?10-60?35?2 with filters off and simply like 42-37-40 with both filters active, only using the pitch value.
Requires Pd 0.47.1 with the libraries cyclone, zexy and list-abs.
XOD - visual programming language for Arduino, Raspberry Pi and other embedded platforms
My name is Ivan. I’d like to tell you about a new programming language we’ve developed - xod.io
Unlike PD, it does not focus on music and sound processing, so the target audience is much wider. But it still can be of interest for you guys =)
XOD is a visual language for microcontrollers and is compatible with Arduino, Raspberry Pi and other boards with a bunch of widespread modules. No firmata or other high-level tricks used, just regular compilation.
We used functional reactive programming principles and added visuality.
We will publish the XOD language, XOD IDE, and library sources on GitHub once launched.
Right now, we are looking for testers for an early access to the XOD private alpha. We believe that with the support of the community we’ll be able to build a fun, and powerful programming language that isn't tied in to any one hardware vendor.
ALSA output error (snd\_pcm\_open) Device or resource busy
Sorry to necro this thread, but I finally found out how to run PureData under Pulseaudio (which otherwise results with "ALSA output error (snd_pcm_open): Device or resource busy").
First of all, run:
pd -alsa -listdev
PD will start, and in the message window you'll see:
audio input devices: 1. HDA Intel PCH (hardware) 2. HDA Intel PCH (plug-in) audio output devices: 1. HDA Intel PCH (hardware) 2. HDA Intel PCH (plug-in) API number 1 no midi input devices found no midi output devices found
... or something similar.
Now, let's add the
pulse ALSA device, and run
pd -alsa -alsaadd pulse -listdev
The output is now:
audio input devices: 1. HDA Intel PCH (hardware) 2. HDA Intel PCH (plug-in) 3. pulse audio output devices: 1. HDA Intel PCH (hardware) 2. HDA Intel PCH (plug-in) 3. pulse API number 1 no midi input devices found no midi output devices found
Notice, how from the original two ALSA devices, now we got three - where the third one is
Now, the only thing we want to do, is that at startup (so, via the command line), we set
pd to run in ALSA mode, we add the
pulse ALSA device, and then we choose the third (3) device (which is to say,
pulse) as the audio output device - and the command line argument for that in
pd -alsa -alsaadd pulse -audiooutdev 3 ~/Desktop/mypatch.pd
Yup, now when you enable DSP, the patch
mypatch.pd should play through Pulseaudio, which means it will play (and mix) with other applications that may be playing sound at the time! You can confirm that the correct output device has been selected from the command line, if you open Media/Audio Settings... once
As the screenshot shows, now "Output device 1" is set to "pulse", which is what we needed.
Hope this helps someone!
EDIT: I had also done changes to
/etc/pulse/default.pa as per https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device beforehand, not sure whether that makes a difference or not (in any case, trying to add
dmix as a PD device and playing through it, doesn't work on my Ubuntu 14.04)
pd 0.47.1 change audio settings will hang program both on Mac and Windows
@leowang Yes, you are correct, my mistake.
I am using windows7.
I was in a hurry and didn't explain well. Try opening Pd from the [fix.pd] patch (Pd not already running)..... and then open media-settings, save and close............. and then see if you can change to what you wish.
I have 64 samples set (Block size) which is called Buffer size (samples) in my Asio4All driver. I have never changed that setting for Pd, but I have had to change it in the driver for some soundcards.
I am (almost) certain that the driver receives a 64 sample block size quite happily, and then you can set the block size for the cpu / outboard dsp in the driver settings. The driver does the block size conversion, and if you set the size too low in the driver then it will stall, or cause dropouts.
I have 2ms (Delay) set in Pd, which is called Buffer Offset in Asio4All. More Buffer offset, hardware or software, can be added in the driver if necessary.
But finding the low latency setting is all trial and error.
I have found that setting the offset (Delay ms) in Pd too low will cause dropouts, and setting it too high can cause Pd to stop responding. I think maybe Pd hangs when you open the Audio-settings window......... before you change the Block size......... and so the fix might help?
pd 0.47.1 change audio settings will hang program both on Mac and Windows
@leowang Hello....... The audio settings should match the hardware of the computer. If you try to set the "wrong" settings it will hang Pd. but as every computer setup is different it is impossible to give advice. Beware.... Delay (ms) and Block Size are not called the same things always in asio and other drivers......
Also, setting too "tight"...... trying to set the latency too low will cause problems.
Here is a patch that will set the audio-settings back to a relaxed normal setup........ fix.pd ..... and then you can try again.
Open it and save the settings.......
It is useful if you get into a situation where Pd will not open properly either....... because of the audio settings...... or where in fact it has already hung as soon as you open the audio-settings....... which is why you cannot change them to the correct ones!
Audio settings window cannot be closed [Vanilla 0.47-1]
@Hasselbalch It is maybe not "factory settings" but it is settings that should work with any system.
I would think that something must be different from your previous settings, but maybe not.
Once Pd is "confused", because it's settings do not match the system, the problem stops you setting something better...... hence my fix. Maybe the audio settings window is then not reliable (not showing it's actual state)?
Very pleased that it helped!
sampling rate impacting sound
Not entirely sure about the math of the whole thing, but what I know is that when you use Jack as your audio server, you don't change your audio setting in Pd, but only in Jack.
Check this, start Jack (in the image you posted, the sampling rate is at 48KHz), then start Pd and open its audio settings. Most likely it will read a 44.1KHz sampling rate. Don't change that, open a new patch and put a [samplerate~] connected to a [print]. Bang it and see what it prints. It should print 48000 and NOT 44100. This is because Jack's sampling rate is at 48000 and that's the sampling rate Pd is using, even though its settings read 44100.
What happens, I guess, is that when you change Pd's audio settings you force a different sampling rate between the client (Pd) and the server (Jack), which causes this frequency difference, which probably occurs due to two different samplings of the same frequency.
The only thing you should probably set in Pd's audio settings (if I'm not mistaken), is the number of channels of your sound card.
Uninstall from Ubuntu 16.04
@EEight It doesn't work, because it says that "El paquete «puredata» no está instalado", that puredata is not installed... isn't it rare?
anibal@anibal-ubuntu:~$ sudo apt-get purge pd [sudo] password for anibal: Leyendo lista de paquetes... Hecho Creando árbol de dependencias Leyendo la información de estado... Hecho Nota, seleccionando «puredata-core» en lugar de «pd» Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios. libgsl0ldbl ttf-dejavu-core Utilice «sudo apt autoremove» para eliminarlos. 0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 2 no actualizados. anibal@anibal-ubuntu:~$ sudo apt-get purge puredata Leyendo lista de paquetes... Hecho Creando árbol de dependencias Leyendo la información de estado... Hecho El paquete «puredata» no está instalado, no se eliminará Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios. libgsl0ldbl ttf-dejavu-core Utilice «sudo apt autoremove» para eliminarlos. 0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 2 no actualizados. anibal@anibal-ubuntu:~$
Then I did:
anibal@anibal-ubuntu:~$ sudo apt-get purge puredata-core Leyendo lista de paquetes... Hecho Creando árbol de dependencias Leyendo la información de estado... Hecho Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios. libgsl0ldbl ttf-dejavu-core Utilice «sudo apt autoremove» para eliminarlos. Los siguientes paquetes se ELIMINARÁN: puredata-core* 0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 2 no actualizados. Se liberarán 2.680 kB después de esta operación. ¿Desea continuar? [S/n] s (Leyendo la base de datos ... 242946 ficheros o directorios instalados actualmente.) Desinstalando puredata-core (0.46.7-3) ... Purgando ficheros de configuración de puredata-core (0.46.7-3) ... Procesando disparadores para man-db (2.7.5-1) ... anibal@anibal-ubuntu:~$ pd anibal@anibal-ubuntu:~$
...and I launched pd fine... The puredata-core corresponded to an earlier installation. Thanks!