IAC Driver
I'm going to have to plead myself stumped once more I'm afraid. I really like the concept of MIDI routing without using Audio/MIDI setup, and MidiPatchbay is easy enough to use, but the patch is still not connecting as I had expected it to (somebody only barely understands the basics of computer science if claiming so isn't hubris on my part). My process is as follows:
-
Start MIDIPatchbay, create a single universal MIDI strip with both input and output - name "PD-Input"/"PD-Output" for reference. Allows all notes, allows all messages, clocks in real-time.
-
The patch itself doesn't show up in Audio/MIDI setup. That's fine, as I understand it the MIDI signal is traveling through MIDIPatchbay anyways. IAC is turned off and no software instruments are installed. I can close down Audio/MIDI setup and ignore it.
-
Start Mainstage, make sure that the volume is up, a patch is readied, and that Mainstage recognizes that there is a MIDI input available. Mainstage recognizes "1 MIDI input available"
-
Start PD-Extended and open the Sequencer patch.
-
Go through the process of making sure all components of the patch are functioning (it has a sequence tempo set, all the notes are active, volume is up, all the usual goodies).
-
Check DSP to on (I don't think it's necessary, but I tend to idiot proof my processes).
-
Set MIDI output from PD-Extended to "PD-Input" from MIDIPatchbay.
At this point I have all three pieces of software running, I believe in the correct order, and connected to one another with the only glitch being that I don't get a lick of audio. I'll dump the patch here for reference:
I try to keep things fairly self-explanatory in terms of sends/receives and with comments within the object arrangement, but here's hoping it's legible. If the problem is in the coding of the patch I can take it across to that section of the forum. That said, even making a simple patch to create a note with set number, velocity, and duration on manual bang and send through the midiout doesn't seem to be arriving to Mainstage. I suppose I could use one of my other programs capable of MIDI synthesis, but that seems superfluous.
I really appreciate the help, I've worked with PD less frequently over the past five years or so than when I was first learning the ropes; it always seems like I have to re-learn a few things as well as double check on my knowledge of possible objects to use... Always something new.
Help?! Implementing Pd into a hardware device
@whale-av yeah, being a portable effects processor for instruments, it needs to be very small and self-contained (in the sense that no peripherals should be sticking out like keyboards or audio interfaces) which is why I was wondering about implementing adc and dac with physical inputs and outputs into the actual thing instead of using peripherals.
@bmd the Axoloti core looks like pretty much exactly what I was going for with hardware! Although missing an extra input and output. That said, I plan on dealing with two mono signals so perhaps I could use the single stereo input and then separate left and right into input 1 and input 2... Having a quick look at this though http://www.axoloti.com/axoloti-patcher/ suggests that it isn't as versatile as Puredata with not many objects available but maybe I'm wrong again. Definitely going to research more into this. It also sounds like it has an easier solution to my problem of not knowing how to physically implement my patch onto some hardware. Thanks for showing me that.
Seeing as Raspberry Pi/Arduino/Puredata has a lot more support around it, plus the fact I wouldn't have to learn a whole new programming software for Axoloti, do you think I'd be able to make something very similar to the Axoloti Core using a Rasperry Pi? Or is this just overcomplicating things to the point where I might as well just learn how to use Axoloti? I'm struggling to find any appropiate ADC for the Raspberry Pi, but I'm sure there's got to be something high quality around, I mean, I find it hard to believe nobody has made a Raspberry Pi with at least 16 bit 44,1kHz audio input and output.
Also, @whale-av made me think... If I'm not having any peripherals sticking out of my signal processor, a touchscreen might be a reasonable idea for this to simplify things and not take up space. It looks a lot more difficult to do this on Axoloti than Raspberry Pi who have their own touchscreens conveniently available, or the Odroid @alexandros mentioned which has a HDMI port. A touchscreen might not be totally necessary but now I've considered it I kinda want it.
GEM error
I know this has been asked a few hundred thousand times- i know because i've been reading everything i can find. But most of the documentation and posts are apparently outdated, or don't seem to work for me.
I had been learning pure data for a few weeks about a year ago using pd extended, but noticed that the libs haden't been updated for a long time, so when i got back into it yesterday i decided to start with the nonextended version.
At first i didn't realize that Gem isn't a standard library, so downloaded it, installed, eventually found that someone suggested to go to edit/preferences/startup, make a new entry and just type "gem" and add it. I did that, restarted. The log window still shows a lot of error messages, it looks like PD is searching for two files:
gem.dll
Gem.m_i386
There are a lot of lines that indicated tried and failed for both, but eventually i see "succeeded" for gem.dll, but not for Gem.m_i386.
Anyway i 'put' an object called gemwin and two messages, create and destroy and link them both to gemwin after creating a new project, then switch to run mode ctrl-e and click on create. Nothing happens. It should make a black, empty gem window, but it doesn't.
In the log window, there are no entries added after clicking on create/destroy, i don't know what i'm doing wrong, can someone suggest what to do?
I've been reading for hours, a lot of pages suggest where to look, but have dead links, or the suggestion didn't help, any ideas?
I pasted below the full startup log (the full log using the "all" option).
Thanks:)
Rob T
------------------ done with main ----------------------
input channels = 2, output channels = 2
Default font: DejaVu Sans Mono
tried ./Gem.m_i386 and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem.m_i386 and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem.m_i386 and failed
tried C:/Program Files (x86)/pd/extra/Gem.m_i386 and failed
tried ./Gem.dll and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem.dll and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem.dll and failed
tried C:/Program Files (x86)/pd/extra/Gem.dll and failed
tried ./Gem/Gem.m_i386 and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem/Gem.m_i386 and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem/Gem.m_i386 and failed
tried C:/Program Files (x86)/pd/extra/Gem/Gem.m_i386 and failed
tried ./Gem/Gem.dll and failed
tried C:/Users/me/AppData/Roaming/Pd/Gem/Gem.dll and failed
tried C:/Program Files (x86)/Common Files/Pd/Gem/Gem.dll and failed
tried C:/Program Files (x86)/pd/extra/Gem/Gem.dll and succeeded
GEM: Graphics Environment for Multimedia
GEM: ver: 0.93.3
GEM: compiled: Nov 10 2011
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version)
GEM: Chris Clepper
GEM: Cyrille Henry
GEM: IOhannes m zmoelnig
GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christoph Steiner, et al.
GEM: found a bug? miss a feature? please report it:
GEM: homepage http://gem.iem.at/
GEM: bug-tracker http://sourceforge.net/projects/pd-gem/
GEM: mailing-list http://lists.puredata.info/listinfo/gem-dev/
GEM: compiled for SIMD architecture: SSE2 MMX
GEM: using SSE2 optimization
The Pd window filtered 40 lines
The Pd window filtered 41 lines```
Midi to hz, and hz to midi formulas
well, to contribute to the vile institution of equal temperament then:
in the first equation the input has 69 subtracted from it. This is in order to get the semitones difference between the input note and 69, which is the a above middle c, (the standard is that this note has a frequency of 440). Then this is divided by 12 in order to get the number of octaves that the input is different from a440 (linearly). 2 is then raised to this power.
The reason for this is that if 2 were raised to the 1st power, 1 octave would be traversed upward. similarly, if 2 were raised to the -1 power the octave would be traversed down, because 2^-1 = 0.5, which is a frequency of the octave below.
And because the midi note 69 was the reference point, what is being determined is the ratio of the frequency difference between the input and a440. Therefore, once we know the frequency ratio between the input note and midi note number 69, it is multiplied by 440 in order to get the result
the next formula is this one in inverse:
The input frequency is divided by 440 to get the frequency ratio between the input and 440. Then log2 is taken of it, which is the power that 2 needs to be raised by in order to get the ratio. So this will be the number of octaves difference between the 2 notes.
The number is multiplied by 12 to convert to 1/2 steps, and then 69 is added to get back up to the note a above middle c because 440 was the reference point in the beginning
@dangrondang out of curiosity, do you have any references for the accepted value of pi being wrong? for all of the talk about the sanctity of mathematics this other value does not seem to agree with mathematical principles relating to series convergence formulas for pi. A simple one of these formulas is the Leibniz one. There is a proof of it on the page also
Regarding your putrid opinion on equal temperament, I would also be curious how you would modulate freely between keys on a keyboard instrument. Are you advocating for well-temperament? a system of pythagorean tuning with movable root? The reason equal temperament exists is mainly to create a system where all keys sound the same. Much of music by the mid-1800s e.g. Beethoven was already freely modulating to far away keys and that does NOT sound very good in pythagorean or even simple well temperament (although certain keyboards in the day had many "versions" of notes and scales)
edit: didn't realize this was such an old topic! oh well, perhaps useful still
"audio i/o stuck"
For each program that is using the ASIO drivers, an ASIO control panel will pop up in the system tray (you might need to adjust your system tray preferences). Each panel controls an instance of the ASIO drivers for that program. You can open that panel and set the inputs and outputs you want to use for that instance.
I said in the above post that ASIO can connect to one program at a time....but that isn't the full explanation. Each ASIO instance can connect 1 program to the same hardware inputs and outputs at a time.
So if you had a soundcard that had 4 outputs, you can setup 2 programs to use the ASIO drivers, one instance goes to output1 and output2, and the other instance can go to output3 and output4.
Getting your sound program running through ASIO (that's by default connected to all inputs and outputs) and getting sound from the browser (Firefox? Chrome? IE?)
is tricky. The browser doesn't use ASIO, it's using the default windows sound driver to access the soundcard. Try loading the browser first then load PD with ASIO or vica versa.
I've only been able to get a consistent working setup by having multiple (2 or more) soundcards. Windows controls one (browser sound, programs that don't use ASIO) and ASIO drivers control the other (PD, tracktor, cubase, FLstudio, etc). Route the sound output from both cards into an external mixer, and the mixer controls the main speakers (or monitors)
Reading multiplexed input streams from arduino
I'm currently building something with an arduino and pd. Arduino vets- help is appreciated!
So, I'm using [comport] and [convert.ascii2pd] to read inputs from an arduino. I'm not using pduino, firmata, etc. because I'm multiplexing the input.
I have a multiplexer read 8 potentiometers going into 1 analog input on my arduino. So I rapidly read all 8 of the inputs in a loop and print them out over serial.
My problem is I don't know how to take this stream and put it to an array properly. Out of [comport] to [convert.ascii2pd] to printing the results looks like this:
print: 790
print: CR
print: LF
print: 0
print: CR
print: LF
print: 0
print: CR
print: LF
print: 0
print: CR
print: LF
print: 703
print: CR
print: LF
print: 649
print: CR
print: LF
print: 547
print: CR
print: LF
END: bang
I'm seperating the values with special characters, which can be weeded out with [route] if need be. I have the end of each 8 input read banging.
But it's late and my head is reeling. Not sure where to start next in terms of putting these properly in a list or an array. The end goal being that I have 8 potentiometers that can control things in pure data. Any way to make sense of this input?
The things we do for more inputs!
Terminal data into Pd
Hi all,
As the title suggests, does anyone know how to get some terminal data into a useable form in Pd?
Terminal command via [shell]
lsof -c Terminal
Comes back with
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Terminal 320 sergery cwd DIR 14,2 1224 389127 /Users/sergery
Terminal 320 sergery txt REG 14,2 1089648 138776 /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
Terminal 320 sergery txt REG 14,2 2295501 288102 /System/Library/Fonts/LucidaGrande.dfont
Terminal 320 sergery txt REG 14,2 5425538 293864 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
Terminal 320 sergery txt REG 14,2 13525940 224074 /private/var/folders/vb/vbpUhSc-HtShEQmAZppmw++++TI/-Caches-/com.apple.ATS/annex_aux
Terminal 320 sergery txt REG 14,2 10244512 400652 /usr/share/icu/icudt36l.dat
Terminal 320 sergery txt REG 14,2 1832384 370074 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/SArtFile.bin
Terminal 320 sergery txt REG 14,2 11144400 270259 /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
Terminal 320 sergery txt REG 14,2 531341 288103 /System/Library/Fonts/Monaco.dfont
Terminal 320 sergery txt REG 14,2 19336 224106 /private/var/folders/vb/vbpUhSc-HtShEQmAZppmw++++TI/-Caches-/com.apple.IntlDataCache.le.sbdl
Terminal 320 sergery txt REG 14,2 808008 352421 /System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat
Terminal 320 sergery txt REG 14,2 100788 246657 /System/Library/Caches/com.apple.IntlDataCache.le.kbdx
Terminal 320 sergery txt REG 14,2 144580 293934 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
Terminal 320 sergery txt REG 14,2 490410 293847 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
Terminal 320 sergery txt REG 14,2 5836820 369904 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/ArtFile.bin
Terminal 320 sergery txt REG 14,2 2396160 553076 /Library/Caches/com.apple.LaunchServices-023501.csstore
Terminal 320 sergery txt REG 14,2 1059792 393626 /usr/lib/dyld
Terminal 320 sergery txt REG 14,2 139087872 431216 /private/var/db/dyld/dyld_shared_cache_i386
Terminal 320 sergery 0r CHR 3,2 0t0 36655364 /dev/null
Terminal 320 sergery 1 PIPE 0x23baee0 16384
Terminal 320 sergery 2 PIPE 0x23baee0 16384
Terminal 320 sergery 3r REG 14,2 5425538 293864 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
Terminal 320 sergery 4 PIPE 0x23b812c 16384
Terminal 320 sergery 5 PIPE 0x23b80c8 16384
Terminal 320 sergery 6 PIPE 0x23ba7d8 16384
Terminal 320 sergery 7 PIPE 0x23ba83c 16384
Terminal 320 sergery 9r REG 14,2 144580 293934 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
Terminal 320 sergery 10r REG 14,2 490410 293847 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
Terminal 320 sergery 12u CHR 15,0 0t105 36958084 /dev/ptmx
PostOpChopShop:~ sergery$ lsof -c Terminal
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
Terminal 320 sergery cwd DIR 14,2 1224 389127 /Users/sergery
Terminal 320 sergery txt REG 14,2 1089648 138776 /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
Terminal 320 sergery txt REG 14,2 2295501 288102 /System/Library/Fonts/LucidaGrande.dfont
Terminal 320 sergery txt REG 14,2 5425538 293864 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
Terminal 320 sergery txt REG 14,2 13525940 224074 /private/var/folders/vb/vbpUhSc-HtShEQmAZppmw++++TI/-Caches-/com.apple.ATS/annex_aux
Terminal 320 sergery txt REG 14,2 10244512 400652 /usr/share/icu/icudt36l.dat
Terminal 320 sergery txt REG 14,2 1832384 370074 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/SArtFile.bin
Terminal 320 sergery txt REG 14,2 11144400 270259 /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera
Terminal 320 sergery txt REG 14,2 531341 288103 /System/Library/Fonts/Monaco.dfont
Terminal 320 sergery txt REG 14,2 19336 224106 /private/var/folders/vb/vbpUhSc-HtShEQmAZppmw++++TI/-Caches-/com.apple.IntlDataCache.le.sbdl
Terminal 320 sergery txt REG 14,2 808008 352421 /System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat
Terminal 320 sergery txt REG 14,2 100788 246657 /System/Library/Caches/com.apple.IntlDataCache.le.kbdx
Terminal 320 sergery txt REG 14,2 144580 293934 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
Terminal 320 sergery txt REG 14,2 490410 293847 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
Terminal 320 sergery txt REG 14,2 5836820 369904 /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/Resources/ArtFile.bin
Terminal 320 sergery txt REG 14,2 2396160 553076 /Library/Caches/com.apple.LaunchServices-023501.csstore
Terminal 320 sergery txt REG 14,2 1059792 393626 /usr/lib/dyld
Terminal 320 sergery txt REG 14,2 139087872 431216 /private/var/db/dyld/dyld_shared_cache_i386
Terminal 320 sergery 0r CHR 3,2 0t0 36655364 /dev/null
Terminal 320 sergery 1 PIPE 0x23baee0 16384
Terminal 320 sergery 2 PIPE 0x23baee0 16384
Terminal 320 sergery 3r REG 14,2 5425538 293864 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
Terminal 320 sergery 4 PIPE 0x23b812c 16384
Terminal 320 sergery 5 PIPE 0x23b80c8 16384
Terminal 320 sergery 6 PIPE 0x23ba7d8 16384
Terminal 320 sergery 7 PIPE 0x23ba83c 16384
Terminal 320 sergery 9r REG 14,2 144580 293934 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
Terminal 320 sergery 10r REG 14,2 490410 293847 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
Terminal 320 sergery 12u CHR 15,0 0t3717 36958084 /dev/ptmx
I'd like to get all this data into Pd somehow.
At some point I'd like to write it to a file and then search through it for the file name that I want. I'm having trouble though. Any ideas?
MIDI and recording
In Linux the JACK 'system' inputs and outputs are limited to what you physically have on your soundcard, but inputs and outputs of the software that connects to JACK are controlled by said software.
In the preferences in PD you can specify how many input and output channels you want PD to use.These channels will show up in the JACK patchbay under 'puredata'.
The DAW that I use is Ardour, and when you add tracks in the program, those channels show up in the JACK patchbay. Each track will get an input and an output that can be connected to the input or output of another program. In this case you want your outputs from puredata to connect to the inputs of the individual tracks in Ardour.
If you don't see the inputs and outputs from puredata or your DAW in the JACK patchbay then:
- your software is not connecting to JACK...it's probably connecting directly to ALSA
or - you are starting the software before you start JACK, in which the software isn't getting registered with JACK, and JACK can't manage the connections.
I'll make some screenshots for you if that will help
HID elements problem
Hi,
I'm getting the same element code for two of the analogue channels on my HID, does anyone have a solution?
Here is the device info that PD is giving me:
TYPE_CODE_________#____EVENT NAME___________
abs abs_x 0 Miscellaneous Input, X-Axis
abs abs_y 0 Miscellaneous Input, Y-Axis
abs abs_z 0 Miscellaneous Input, Z-Axis
abs abs_rx 0 Miscellaneous Input, X-Rotation
abs abs_ry 0 Miscellaneous Input, Y-Rotation
abs abs_rz 0 Miscellaneous Input, Z-Rotation
abs abs_ry 1 Miscellaneous Input, Dial
abs abs_throttle 0 Miscellaneous Input, Slider
I don't have an issue with other software which recognises it as "Dial", which PD is doing, but i can't access this tag...
Thanks!
Yas
Export patch as rtas?
@Maelstorm said:
If you're on OSX, jack can be used as an insert plug-in so you can avoid the separate tracks, but you still get the latency.
which you can, depending on your host, eliminate by setting the track delay for the track with the plugin. So if the buffer is 512 sample/11.82 ms then set the delay to that and it should be spot on.
I've had the whole Jack graph latency explained to me numerous times by Stephane Letz and it still doesn't go in.....Heres what he told me...
> > Its the Pd > JAck > Ableton latency. (Ableton has otoh 3 different
> > ways of manually setting latency compensation - I'm just not very
> > clear on where to start with regards to input from JAck)
> >>>>
>
> This is NO latency introduced in a Pd > JAck > Ableton kind of
> chain; the JACK server activate each client in turn (that is Pd *then*
> Ableton in this case) in the *same* given audio cycle.
>
> Remember : the JACK server is able to "sort" (in some way) the graph
> of all connected clients to activate each client audio callback at the
> right place during the audio cycle. For example:
>
> 1) in a sequential kind of graph like IN ==> A ==> B ==> C ==> OUT,
> JACK server will activate A (which would typically consume new audio
> buffers available in machine audio IN drivers) then activate B (which
> would typically consume "output" just produced by A) , then activate
> C , then produce the machine OUT audio buffers.
>
> 2) in a graph will parallel sub-graph like : IN ==> A ==> B ==> C
> ==> OUT and IN ==> D ==> B ==> C ==> OUT (that is both A and D are
> connected to input and send to , then JACK server is able to
> activate A and D at the same time (since the both only depends of IN)
> and a multi-core machine will typically run A and D at the same time
> on 2 different cores. Then when A *and* D are finished, B can be
> activated... and so on.
>
> The input/output latency of a usual CoreAudio application running
> is: driver input latency + driver input latency offset + 2
> application buffer-size + driver output latency + driver output
> latency offset.
>
this next part is the important bit i think...
> For a graph of JACK clients: driver input latency + driver input
> latency offset + 2 JACK Server buffer-size + ( one extra buffer-
> size ) + driver output latency + driver output latency offset.
>
> (Note : there is an additional one extra buffer-size latency on OSX,
> since the JACK server is running in the so called "asynchronous" mode
> [there is also a "synchronous" mode without this one extra buffer-size
> available, but it is less reliable on OSX and we choose to use the
> "asynchronous" mode by default.])
>
> Stephane
>