[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Gendy UGens guest star on iPhone



hi Nick,
good to know of the 'Compile for Thumb' flag. shall i look forward an update via itunes soon then? ;-)


as a side note...
for those that develop patches for iphone sc on their computer and miss the Accelerometer ugens, i've posted wrapper classes for my sudden motion sensor ugen here...
http://www.fredrikolofsson.com/pages/code-sc.html#plugins
they're called RedAccelerometer and are now part of the RedInfo package.
with these you can use a mac book's internal accelerometer for testing (don't drop the machine though).

so the gendy example below would look like running on the computer...
{var x=RedAccelerometerX.kr(1,499,1).clip(1,499);var y=RedAccelerometerY.kr(500,999,1).clip(500,999);var z = RedAccelerometerZ .kr (0,20,0 ).clip (0,20 );Splay.ar({Gendy1.ar(minfreq:x,maxfreq:y,durscale:z)}.dup(12).sum, 1,0.25)}.play

and then you just need to remove all the Red before running it on the iphone/ipod... {var x=AccelerometerX.kr(1,499,1).clip(1,499);var y=AccelerometerY.kr(500,999,1).clip(500,999);var z = AccelerometerZ .kr (0,20,0 ).clip (0,20 );Splay.ar({Gendy1.ar(minfreq:x,maxfreq:y,durscale:z)}.dup(12).sum, 1,0.25)}.play

(sorry for the hassle with name changing but there are already Accelerometer classes in the sc distro. you might want to replace those locally and then have no more hassle)
_f


29 dec 2009 kl. 15.45 skrev Click Nilson:

cheers f,

Discrepancies might be to do with the more efficient for floating point turning off of 'Compile for Thumb' in Xcode for iPhone, which I might not have known about when I made the first iGendyn!

but more importantly the big difference is probably the CocoaTouch graphics, since there are more objects to draw in update for each active touch (one touch is one Gendy instance).

I should get around to writing an updated version with OpenGLES etc some day...


On 29 Dec 2009, at 12:28, Fredrik Olofsson wrote:

sorry for reopening such an old thread. and not at all meant to belittle nick's fun gendy app.

but here are some tests. on my ipod 2nd generation os 3.1.2 with recent isc build, i get these numbers...

{Pan2.ar({Gendy1.ar}.dup(20).sum,0,0.2)}.play
avg cpu: 62%
peak cpu: 64%
so that's 20 gendy1s but with more the ipod becomes unresponsive.

{Pan2.ar({Gendy2.ar}.dup(10).sum,0,0.2)}.play
avg cpu: 39%
peak cpu: 41%
and here 10 gendy2s.  more and the audio starts to crackle.


last here's a quite fun patch for the ipod/iphone. takes between 25 and 40% {var x=AccelerometerX.kr(1,499,1).clip(1,499);var y=AccelerometerY.kr(500,999,1).clip(500,999);var z = AccelerometerZ .kr (0,20,0 ).clip (0,20 );Splay.ar({Gendy1.ar(minfreq:x,maxfreq:y,durscale:z)}.dup(12).sum, 1,0.25)}.play

i had to clip the output out Accelerometer ugen else the sound would blow up. is it generating some inf values perhaps?
_f


18 jun 2009 kl. 11.10 skrev Dan Stowell:

Interesting stuff Nick, thanks for the link and the info.

Now if Axel would show us his scsynth+iphone code (HINT HINT HINT
HINT) we could compare the efficiency of the raw gendys against
scsynth-based gendys, which would be interesting too...

Dan




2009/6/18, Click Nilson <clicksonnil@xxxxxxxxx>:
Hi Mathias,

Glad you like it; it's just a first attempt to try out things like
multitouch and accelerometer!

Underneath the surface it's just the Gendy1 and Gendy2 C++ UGen code
(that I wrote originally) behind the scenes; no SC wrapper code or
other SC appears in it.

I found the CPU limit to run without break-ups was 3 Gendys at once,
which is why multitouch ends at three...

best
Nick

On 17 Jun 2009, at 16:58, Mathias Kluetz wrote:

hey Nick,
really cool app! mostly i like that it's multitouchable.
is supercollider playing any roll behind the scenes or just the ugens?

best, mathias


Am 16.06.2009 um 21:53 schrieb Click Nilson <clicksonnil@xxxxxxxxx>:

Hope this works:

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?
id=317986145&mt=8

I've just released a free app called iGendyn which plugs Gendy1
and Gendy2 into touch and accelerometer control, might be fun to
try if you have an iPhone/iPod Touch...


 #|
    fredrikolofsson.com     klippav.org     musicalfieldsforever.com
 |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/