I have sound

13 views
Skip to first unread message

Dan S

unread,
Apr 18, 2010, 12:11:31 PM4/18/10
to supercollider-android-developers
Hi -

I have sound! Nice :)

Well, to be honest the sound isn't nice - I'm not sure if my device
(Tattoo) is overloaded or if there's something else going on, because
it's extremely stuttery, to the extent that I can't tell for sure if
it's the \default synth playing or not. (On the Tattoo there's a
restriction which prevents me from checking the cpu load!)

Alex, in your issue report <http://github.com/glastonbridge/
SuperCollider-Android/issues#issue/4> you said "outputting white noise
when it should be silent" - did you see this line in SCAudio.java:

scsynth_android_makeSynth("default");

It should start a synth - i.e. it shouldn't be silent - so perhaps
what you're hearing is the default synth but with garbled audio data?
Would be helpful if you could clarify so I know what things to try...

Cheers
Dan


--
Subscription settings: http://groups.google.com/group/supercollider-android-developers/subscribe?hl=en

Dan S

unread,
Apr 18, 2010, 12:16:00 PM4/18/10
to supercollider-android-developers
On Apr 18, 5:11 pm, Dan S <danstow...@gmail.com> wrote:
> Hi -
>
> I have sound! Nice :)
>
> Well, to be honest the sound isn't nice - I'm not sure if my device
> (Tattoo) is overloaded or if there's something else going on, because
> it's extremely stuttery, to the extent that I can't tell for sure if
> it's the \default synth playing or not. (On the Tattoo there's a
> restriction which prevents me from checking the cpu load!)
>
> Alex, in your issue report <http://github.com/glastonbridge/
> SuperCollider-Android/issues#issue/4> you said "outputting white noise
> when it should be silent" - did you see this line in SCAudio.java:
>
>    scsynth_android_makeSynth("default");
>
> It should start a synth - i.e. it shouldn't be silent - so perhaps
> what you're hearing is the default synth but with garbled audio data?
> Would be helpful if you could clarify so I know what things to try...

Ah, I should have read your message from April 4th, you say you get
noise even with that line deactivated. I don't. When I comment out
that line I get silence - so either you've already fixed it or there's
a difference between our setups.

glasto...@googlemail.com

unread,
Apr 19, 2010, 5:05:19 AM4/19/10
to supercollider-android-developers
Since then the problem has gone away, so I either changed something
before filing the bug, or PEBKAC. Now it sounds a bit like a
helicopter, whereas before it was going "shh shh shh shh." It phases
slightly, which makes me think it's the right synth :)

Hurrah! This is good news indeed. I did change the genaudio function
in SC_Android.cpp, perhaps I've done something foolish and it's not
generating enough data. I'll have a look this eve...

Thanks!

Alex
> Subscription settings:http://groups.google.com/group/supercollider-android-developers/subsc...

Dan Stowell

unread,
Apr 19, 2010, 5:18:49 AM4/19/10
to supercollider-an...@googlegroups.com
Yes that's it - phasey helicopter is what I get too. I also tried with
a basic LFSaw synthdef which gave a nonphasey helicopter. So, since
that second synthdef was extremely basic, yet the helicopter was going
at the same speed as \default, I suspect it's not cpu overload (though
it could still be) - perhaps a buffer-size mistake as you suggest, or
perhaps an issue with device I/O.

Dan


2010/4/19 glasto...@googlemail.com <glasto...@googlemail.com>:
--
http://www.mcld.co.uk

glasto...@googlemail.com

unread,
Apr 20, 2010, 3:38:39 AM4/20/10
to supercollider-android-developers
I've got it down to buffer size SOMEWHERE I think. I did a naive "run
genaudio and count the zeroes" and it seems to max out at 379 non-zero
ints (a really helpful number!), regardless of the buffSizeFrames
value. Tonight I'll try stepping through the initialisation code, and
see where the buffer size goes missing.

For fun, if you set the AudioTrack audio buffer to
AudioTrackgetMinBufferSize, and you set buffSizeFrames to something
small you can get it sounding pretty close to proper synthesis :)

On Apr 19, 10:18 am, Dan Stowell <danstow...@gmail.com> wrote:
> Yes that's it - phasey helicopter is what I get too. I also tried with
> a basic LFSaw synthdef which gave a nonphasey helicopter. So, since
> that second synthdef was extremely basic, yet the helicopter was going
> at the same speed as \default, I suspect it's not cpu overload (though
> it could still be) - perhaps a buffer-size mistake as you suggest, or
> perhaps an issue with device I/O.
>
> Dan
>
> 2010/4/19 glastonbri...@googlemail.com <glastonbri...@googlemail.com>:

glasto...@googlemail.com

unread,
Apr 22, 2010, 4:30:01 AM4/22/10
to supercollider-android-developers
YES! I've got it. mBufLength needed to be set from the
scsynth_android_start function, and I've ported the audio driver to
work with shorts because it's simpler code than bytes. I'm going to
tidy up my code and upload later today :D

Now to start thinking about APIs and Services and stuff! I'll compile
a short roadmap for discussion, and once that's okay we can start
working down it.

I'm having a good morning.

Alex

On Apr 20, 8:38 am, "glastonbri...@googlemail.com"

Dan S

unread,
Apr 23, 2010, 4:38:16 AM4/23/10
to supercollider-android-developers
Reply all
Reply to author
Forward
0 new messages