Generate float values out of pressure sensitive matrix (Arduino)
sorry for the late reply, somehow the it was not possible to post for some time.
@whale-av, ah, now i understand! So the data size needs to be set to the number of pressure values that i'm sending in to the filter. Makes sense and it seems to work much better now. Still there is indeed a calculation problem in [example] that i now understand. By ignoring the lowest input of the three neightbouring crossings most scenarios cant be handled correctly.
For example:
crossing A / note 61 = pressure 75
crossing B / note 62 = pressure 95
crossing C / note 63 = pressure 76
The highest pressure obviously lies almost exactly at B and in the middle between A and C. The calculated note should be approx. 62.05...
[example] though will calculate that B and C have the smallest difference, leave out A, and output the note 62.2.
So it is indeed needed to calculate all three values together if i want to have the correct peak of pressure. I thought and googled a bit and figured, that it would probably be the best if the three known values are used for a quadratic equation that can help determine a parabola and thus the apex of the pressure applied. I think it will the patch more simple too. Will try to do it with [expr] the next days and give an update as soon as possible.
Looking for an object like cyclone/togedge but for signals
@jenkutler
The helpfile of [cyclone/togegde~] doesn't work here, but I replicated it's behavior in signalrate like this:

If you want strictly ints, you can add a signalrate [int] like this:

@bocanegra said:
The logical output is signal rate (which can be very useful). If you want bangs look into [threshold~]. You should be able to set that up as a zero crossing detector.
I don't know about [threshold~] never used it, but my example above is not suitable as zerocrossing detector, as the chance of a sample being actually 0 at zero-crossing is very small!
Detecting zero-'crossing' would be a transition from postive to negative or vice versa, or to zero. There is also [zerox~].
The DSP block size will affect the accuracy of the timing though so if you need a bang exactly when your signal crosses zero, you will need to do [block~ 1]
Much later edit: the following is actually wrong, - it is even more complicated (((Message-handling happens in 64-sample periods, only. You can't change that. Even if [threshold~] would go down to 1 sample (still one sample late), the following message-chain won't.))))
EDIT: edited
Best way to avoid clicks (tabread4~)
@lacuna said:
Who hears clicks when switching at zero-crossings?
It's always been absolute nonsense that it's safe to edit at zero crossings -- as you demonstrated 
I think: to avoid clicks, not only the signal itself should avoid discontinuities, but also the derivative (the slope) of the signal should avoid discontinuities. A sharp cutoff at a zero crossing will feature a break in the slope even if there isn't a large jump in the signal itself.
This is also why a sinusoidal envelope is smoother -- because the slope of the envelope is itself a sinusoid (derivative of sin = cos and vice versa).
hjh
Paradigms useful for teaching Pd
@jancsika said:
Actually the solution purposefully avoids that approach. Look inside
[list-drip]: it was purpose-written to do an end-run around the performance problems that come from copying data downstream to be processed later.
I thought [list store] and a "get" message avoided the need to split the list.
The approach of incrementally building the sub-messages does indeed work in this case, but again only because the message payloads are "Pd sized" payloads. Add some configuration state for a "table" key that takes a 128 element payload are you might start to see problems (depending on when and how this configuration state gets set.)
So: One Pd weakness is that there is no mechanism to initialize a [list] object with no contents but n pre-allocated slots. If you could send a message, say, "alloc 20" to a [list prepend], then you would have a concatenator that could absorb 20 items before incurring the cost of allocating more slots. Currently there is no way to avoid that cost, even for short lists.
Concatenation is really useful. It would be better to support it well, rather than trying to find weird ways to avoid it.
At least when I look at OP's problem, I see global receiver names followed by messages.
That's a good insight.
hjh
Fresh Pd 0.50.2 install comes with broken libs and deken installs broken libs
@seb-harmonik.ar said:
@ddw_music said:
One way that this could be improved:
- Per patch file, keep a list of which locations have provided externals or abstractions.
- If it's the first time this subdirectory provided an object to this patch file, print a message in the console (help the user not overlook the dependency).
I don't think this is a good idea. It would clog up the console...
My two quoted suggestions here go together: If the patch object has a list internally of its dependencies, then it's possible to report a dependency only the first time it's accessed in a given patch file. If I open a new patch and create a [gate] and later a [play~], I would want to see a message about cyclone only once per patch file, not per cyclone object. Obviously the latter would be clutter but my suggestion as worded was intended to avoid excessive clutter: "If it's the first time this subdirectory provided an object to this patch file..."
- If there is a binary library in the access path, load it automatically. Do not make the user distinguish between lib and path.
I realized later that there's a flaw to this logic: you don't know which objects a library binary provides without loading the binary -- so in practice, object search might need to load all binaries
Of course that would not be ok. It may be a solvable problem, if there's some way for a binary to make an object manifest known without fully initializing.
^^ This explains why search is non-recursive, so I'll have to drop my earlier comment about that.
- Have a menu option to print a list of dependencies. (If the list of external subdirectories is saved in the patch, this is easy.)
maybe there could be some kind of helper object or something in
[pdcontrol]or[declare]that gets a list of all of the library or external dependencies of a patch when the user needs them. (or maybe some external would be better).
Sure, that would work. There's not a substantive difference between those approaches.
FWIW SuperCollider's "greedy" approach to loading extensions isn't totally ideal either -- because method dispatch is resolved at runtime, there's no way to know by scanning code whether a method call will hit an extension, or which one. I've been bitten by this more times than I can count. That's one reason why I switched my Pd teaching over to use [declare].
The -lib vs -path thing, though... sheesh, it's like "let's deliberately annoy users and drive them away" -- and that pull request is hilarious -- "hmm, but what if you want to declare a library that is called -path?" Really? This kind of bizarre hypothetical is why they would question an honest attempt to make life easier for users? "Oh, let's push this idea into limbo because of something that nobody with an ounce of common sense would ever do" 
hjh
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```
NVidia puredyne vs vista
Hey
Once again I'm back on vista. My brief journey to puredyne goes something like this.
from puredyne
partitioned new hard drive with 4 partitions 1-swap , 2 ext4 200Gib, 1 NTFS 200GB . Copied Vista to NTFS partition with gparted(started to do this with dd but with new Gibabits stuff I was skeered but hey a platter is a platter and a cluster is a cluster right). Actually there was a 5th partition in there which was the vista restoration partition but I eventually deleted it for obvious reasons.
Removed old drive ,
took machine to ethernet connection with internet,
booted to vista ,
installed Norton virus scanner - only 1 virus, 2 tracking cookies, and one gain trickler after over a year with no virus scanner, Thats pretty good and shows you can be selective about what you download and where you visit on the web and not get any viruses.
Was trying to get windows movie maker to work with mov codec which it doesnt.
Installed auto updates for the first and only time. this took about 3 hours and still needed to install service pack 1, 2. Aborted trying to update win movie maker
****Problem 1***** MS movie maker does not work with GEM mov video output codec.
Installed latest Nvidia drivers for vista.
Woohooo OpenGl hardware acceleration GEM works so much better in vista now.
*****Problem 2********ASIO for all does not allow 2 applications to run with audio and midi at the same time. If I wanted to run Widi and play my guitar so puredata can receive midi input from guitar ASIO will not allow it but ASIO for all is the only way I can get latency down so this would be feasible.
Got frustrated.
Installed fresh copy of puredyne onto 2nd ext4 partition.
ran puredata audio latency good with fresh install. gem video bad.
used synaptics to install nvidia drivers. v185 I think.
ran GEm error no opengl config.
downloaded gdeb , flash player, google chrome, nvidia drivers from nvidia site.
installed gdeb from terminal, flash and chrome from gdeb.
rebooted to log in as root and iunstalled nvidia drivers.
woohoo hardware acceleration for opengl
******problem 3************
gem works great but audio glitches with puredata window visible.
when only gem window is visible i can unaudioglitchily move the mouse around to control same parameters that would normaly be controled with sliders in pd window.
Seems like before i upgraded nvidia video drivers hw:do o whatever it is, was listed in JackD as realtek HD Audio, now it is listed as NVIDIA HD Audio.
So Gem works great but not when Pd window is open and I think my audio drivers were replaced with Nvidia.
I would really like to get back to my patch and stop wasting time on these operating systems and hardware configurations I thought in the last 15 years all this hardware acelleration and autodetection would be figured out but no all we got is rc.0, rc.01, rc.02, rc, etc...... instead of just rc.d.
Ok I'm getting an error when I exit puredyne that says pid file not found is jackd running. anyone know what that means?
Also does anyone have a keymap for gem keyboard for linux, windows and mac so I don't have to record them.
Any suggestions about what to do about my ASIO problems in windows?
Any suggestions about my audio driver in Linux?
Any suggestions about my GEM mov video / windows incompatibilities?
I can import the mov video and audio to SF Acid 3.0 and output a 2Gb avi then import it into windows movie maker but this is crazy to do for a 7 minute 12fps 320x240 video.
Ahhhhhhhhh!
Any suggestions are welcome!
PS I believe someone could rewrite puredata's audio and video interface in assembly language to control their hardware before figuring out how to get these operating systems to do it.
PureData Bootcamp- Cardiff UK, Sept 09
Please excuse the cross posting:
PureData Bootcamp
Tuesday 1 September - Saturday 5 September
The Royal Welsh College of Music and Drama is proud to offer an intensive 5 day PureData workshop. PureData is a free and open source real-time graphical programming environment used by artists to create a range of visual arts, theatre, dance, audio, installation, performance and media art works.
This intensive boot-camp is designed for artists working in different media to explore the capabilities of PureData to create interactive environments, real-time sound design, physical modeling, manipulation of live visuals and interface authoring.
The course will culminate in a performance/ installation/ concert of the work realised during the week.
Participants are welcome to bring their own laptops, but full resources are provided.
To apply for this course, please download the registration form here or contact the Events Team to receive a registration form via email or post
Cost: £200 + VAT
***Early Bird Offer***
£100 + VAT
Only Until August 1st
How to Book
Complete the booking form and return, enclosing a cheque or credit card payment details, to: Events Team, Royal Welsh College of Music & Drama, Castle Grounds, Cathays Park, Cardiff CF10 3ER
For a hard copy of the booking form contact the Events Team on 029 2039 1391 or email: shortcourses@rwcmd.ac.uk
Although there is no application deadline, places are limited so early booking is recommended
Additional Information
If you have a disability please provide sufficient information at the time of booking so we can consider any special arrangements necessary
The restaurant at the College will be open at lunchtime for the purchase of hot and cold meals
Accommodation can be arranged through the College at Severn Point, the privately owned RWCMD Halls of Residence, at a cost of £20 per night. Severn Point offers indiviudal en-suite rooms which are arranged in flats of 6 bedrooms around a communal living and kitchen space. The Halls are aproximately 12 minutes walk from the College.
To book a place in the Halls of Residence please fill out the booking form and return to the Events Team 3 weeks before the start of your course.
If you require more information about any aspect of the accommodation please contact the Events Team on 029 20391 391.
Further Queries
If you have any queries about any aspect of this summer school please contact the Events Team on 029 20391 391
Terms and Conditions
This course is suitable for individuals aged 16 + only. All information is correct at the time of writing; however, should there be any changes to general information, course content or tutors, students will be informed prior to the start of the Summer School
For further information, contact: Events Team on 029 2039 1391
Changing length of beats/steps/something......?
The reason why it's not working until you open [wrap~]'s help window is because audio needs to be turned on. The help patch does this automatically with:
[loadbang]
|
[; pd dsp 1(
So I'll try to explain how this patch works. It's based on using a master [phasor~] object for everything to sync to. I used beats per minute because Hz is the same thing as cycles per second. By dividing bpm by 60, you get beats (cycles) per second. It's just easier math (to me) than using ms, and it's more musically intuitive anyway.
The signal for the [phasor~] is multiplied by the beat division, scaling its range. So if you want the beat divided into four subdivisions (16th notes), it will be scaled up from 0-1 to 0-4. [wrap~] takes a signal and wraps it around so that it falls within a range of 0-1, so 2.3 will become .3, etc. It essentially just gives you the fractional part of a number. Sending the scaled up [phasor~] output to this results in a ramp that is synced to the subdivision. This is then subtracted by .5 to scale the range from -.5 to .5, just so there are some zero-crossings.
[zerox~] is used to detect the zero-crossings. It doesn't seem to have a helpfile, and I'm not sure what the difference between the to outputs are. I just know they very briefly spit out a 1 when crossing zero. [edge~] detects sudden jumps in a signal and outputs a bang, which is used to drive the counter.
It's just occured to me that [zerox~] detects zero-crossings going up and down, and I designed the patch with the idea that it should only detect signals crossing downward. So it's actually going twice as fast as it should! Dividing the bpm by 120 instead of 60 should remedy that.
Hope that helps.
Time-counter, Flip - flop, comparitor...?
Hey there.
I'm trying to biuld a patch which run realtime count-ups (in msec) between zero crossings.
I haven't sound the right modules necessary to do the tasks below.
I'd appreciate anyone's advice.
So, I need a counter that generates a streaming signal of upcounting time.
it needs to be resettable, and just keep counting upward. having some maximum time-argument or stop-out would help prevent stacks from overflowing.
the trick is, this needs to run at signal speed (default 44.1khz), and be able to stream out fractions of a millisecond,
thus, I can't use a metronome, because the metronome seems to only go down to 1 millisecond.
(unless I'm mistaken).
I need to reset these counters eveery time the signal crosses above and below zero, so I need some kind of comparitor signal unit, which outputs a bang only and exactly when the cross to one side is made.
I want to use this with a flip flop of sorts, which simply changes input status every time it recieves the bang.
I'd really appreciate it if anyone could:
...direct me to existing modules or applications/combinations that could do this kind of thing.
...refer me to existing abstractions that people have cooked up for this kind of thing.
cheers,
G...
