Mac midi sound weirdness - it gets louder for first few notes.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Mac midi sound weirdness - it gets louder for first few notes.

timrowledge
Dear Abby,
I’ve been dealing with some ‘fun’ Pi scratch sound related issues and a weird one has come up on the Mac. Oddly enough the problem was reported on the Pi but I can’t replicate it and whilst trying to work out what on earth is happening I discovered the Mac issue.

When a scratch script has a loop that looks like this

do forever
wait 0.5 secs
play midi note 60 for 0.5 beats

we hear the first few notes get louder and then stabilise at noticeably louder. If the wait time is longer - say 1 sec - it doesn’t seem to happen. The same effect happens with drum ‘notes’ via MIDI too.

The really odd part is that on the Pi there is *no* MIDI system making the noise - it is faked from an FMSound organ1 or SampledSound coffeeCupClink. And yet the user heard the effect; and I don’t.

I’ve checked the actual MIDI control byte value being sent to set the volume and it doesn’t vary. On the Pi the volume value sent to to the sound player system doesn’t vary either. I even checked that I wasn’t going insane by getting my wife to listen and she heard it get louder.

So my question is - is it wrong to take all the milk chocolate biscuits?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Klingon Code Warrior:- 7) "You question the worthiness of my Code?! I should kill you where you stand!"



Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Karl Ramberg
I have heard this sometimes myself on various platforms. Repeating a sound in Etoys (having a sound play in a ticking script) sometimes sturates the sound channel and it gets really loud and sounds awfull.
I'm not sure if this is a problem in the plugins or in the sound player classes.
 
Karl

On Thu, Nov 6, 2014 at 2:22 AM, tim Rowledge <[hidden email]> wrote:
Dear Abby,
I’ve been dealing with some ‘fun’ Pi scratch sound related issues and a weird one has come up on the Mac. Oddly enough the problem was reported on the Pi but I can’t replicate it and whilst trying to work out what on earth is happening I discovered the Mac issue.

When a scratch script has a loop that looks like this

do forever
wait 0.5 secs
play midi note 60 for 0.5 beats

we hear the first few notes get louder and then stabilise at noticeably louder. If the wait time is longer - say 1 sec - it doesn’t seem to happen. The same effect happens with drum ‘notes’ via MIDI too.

The really odd part is that on the Pi there is *no* MIDI system making the noise - it is faked from an FMSound organ1 or SampledSound coffeeCupClink. And yet the user heard the effect; and I don’t.

I’ve checked the actual MIDI control byte value being sent to set the volume and it doesn’t vary. On the Pi the volume value sent to to the sound player system doesn’t vary either. I even checked that I wasn’t going insane by getting my wife to listen and she heard it get louder.

So my question is - is it wrong to take all the milk chocolate biscuits?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Klingon Code Warrior:- 7) "You question the worthiness of my Code?! I should kill you where you stand!"






Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Wolfgang Eder
hi,
is it possible that the sound gets „repeated“ and thus becomes louder and louder?
i mean: played once, played twice simultanously, played three times simultaneously etc.
just my 2c
kind regards
wolfgang


Am 06.11.2014 um 08:53 schrieb karl ramberg <[hidden email]>:

I have heard this sometimes myself on various platforms. Repeating a sound in Etoys (having a sound play in a ticking script) sometimes sturates the sound channel and it gets really loud and sounds awfull.
I'm not sure if this is a problem in the plugins or in the sound player classes.
 
Karl

On Thu, Nov 6, 2014 at 2:22 AM, tim Rowledge <[hidden email]> wrote:
Dear Abby,
I’ve been dealing with some ‘fun’ Pi scratch sound related issues and a weird one has come up on the Mac. Oddly enough the problem was reported on the Pi but I can’t replicate it and whilst trying to work out what on earth is happening I discovered the Mac issue.

When a scratch script has a loop that looks like this

do forever
wait 0.5 secs
play midi note 60 for 0.5 beats

we hear the first few notes get louder and then stabilise at noticeably louder. If the wait time is longer - say 1 sec - it doesn’t seem to happen. The same effect happens with drum ‘notes’ via MIDI too.

The really odd part is that on the Pi there is *no* MIDI system making the noise - it is faked from an FMSound organ1 or SampledSound coffeeCupClink. And yet the user heard the effect; and I don’t.

I’ve checked the actual MIDI control byte value being sent to set the volume and it doesn’t vary. On the Pi the volume value sent to to the sound player system doesn’t vary either. I even checked that I wasn’t going insane by getting my wife to listen and she heard it get louder.

So my question is - is it wrong to take all the milk chocolate biscuits?

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Klingon Code Warrior:- 7) "You question the worthiness of my Code?! I should kill you where you stand!"









smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Bert Freudenberg
In reply to this post by timrowledge
On 06.11.2014, at 02:22, tim Rowledge <[hidden email]> wrote:

> Dear Abby,
> I’ve been dealing with some ‘fun’ Pi scratch sound related issues and a weird one has come up on the Mac. Oddly enough the problem was reported on the Pi but I can’t replicate it and whilst trying to work out what on earth is happening I discovered the Mac issue.
>
> When a scratch script has a loop that looks like this
>
> do forever
> wait 0.5 secs
> play midi note 60 for 0.5 beats
>
> we hear the first few notes get louder and then stabilise at noticeably louder. If the wait time is longer - say 1 sec - it doesn’t seem to happen. The same effect happens with drum ‘notes’ via MIDI too.
Do you mean only after image start, or every time you trigger the script?

I do not hear it - Mac VM 4.2.5b1u, Mac OS 10.9.5, 2011 MacBook Pro.

> The really odd part is that on the Pi there is *no* MIDI system making the noise - it is faked from an FMSound organ1 or SampledSound coffeeCupClink. And yet the user heard the effect; and I don’t.
>
> I’ve checked the actual MIDI control byte value being sent to set the volume and it doesn’t vary. On the Pi the volume value sent to to the sound player system doesn’t vary either. I even checked that I wasn’t going insane by getting my wife to listen and she heard it get louder.
>
> So my question is - is it wrong to take all the milk chocolate biscuits?

I don't mind, but don't event think about taking the pretzels.

- Bert -





smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Bert Freudenberg
In reply to this post by Karl Ramberg

On 06.11.2014, at 08:53, karl ramberg <[hidden email]> wrote:

I have heard this sometimes myself on various platforms. Repeating a sound in Etoys (having a sound play in a ticking script) sometimes sturates the sound channel and it gets really loud and sounds awfull.
I'm not sure if this is a problem in the plugins or in the sound player classes. 

This is simply because triggering the same Etoys sound while it is still playing just adds another copy of it to the output stream. Since Etoys sounds are about a second long, and you tick at least 8 times a second, this adds the same sound 8 times on top of itself. Yes it sounds awful.

The Right Thing to do would be to keep track of the sound being played by each Etoys object, and loop the sound as long as it is being re-triggered. The fire-and-forget method in place now is just much simpler.

A second thing making it worse is that Reverb is on by default, at a pretty high level. While it makes the sounds appear fuller if played alone, it exacerbates the effect when playing the same sound over and over. This is not really the Reverb's fault though. 

- Bert -




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

timrowledge
In reply to this post by Wolfgang Eder

On 06-11-2014, at 12:20 AM, Wolfgang Eder <[hidden email]> wrote:

> hi,
> is it possible that the sound gets „repeated“ and thus becomes louder and louder?
> i mean: played once, played twice simultanously, played three times simultaneously etc.

The odd thing is that it gets louder for a few (say 4-5) cycles and then no louder. It isn’t getting obnoxiously loud and causing any distortion. It happens each time you fire the scratch script, starting again at the quieter level and building up.

Weird.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
If you think nobody cares about you, try missing a couple of payments.



Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Casey Ransberger-2
What's making the actual sound come out? Sounds like you've figured the MIDI part out, and that isn't it. Are you sure it isn't some kind of default sound with an envelope or maybe even just a ramp of reverb to make crappy MIDI stuff sound a little more hot?

Seems pretty obvious that what you're hearing is in the VM. I'm just wondering which musician put it there and why. Fascinating, anyway.

Can you share a recording of what you're hearing? May as well use my ears while they still work.

C

> On Nov 6, 2014, at 10:00 AM, tim Rowledge <[hidden email]> wrote:
>
>
>> On 06-11-2014, at 12:20 AM, Wolfgang Eder <[hidden email]> wrote:
>>
>> hi,
>> is it possible that the sound gets „repeated“ and thus becomes louder and louder?
>> i mean: played once, played twice simultanously, played three times simultaneously etc.
>
> The odd thing is that it gets louder for a few (say 4-5) cycles and then no louder. It isn’t getting obnoxiously loud and causing any distortion. It happens each time you fire the scratch script, starting again at the quieter level and building up.
>
> Weird.
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> If you think nobody cares about you, try missing a couple of payments.
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

timrowledge

On 06-11-2014, at 12:50 PM, Casey Ransberger <[hidden email]> wrote:

> What's making the actual sound come out? Sounds like you've figured the MIDI part out, and that isn't it. Are you sure it isn't some kind of default sound with an envelope or maybe even just a ramp of reverb to make crappy MIDI stuff sound a little more hot?

I have no idea where it goes after the midi plugin; there must be a default midi-capable sound synthesizer built in to the OS X stuff I guess; purely by analogy from the ‘fun’ we’re having making a similar thing work on linux for the Pi.

>
> Seems pretty obvious that what you're hearing is in the VM. I'm just wondering which musician put it there and why. Fascinating, anyway.

I dunno. MIDI control bytes are going out and something is ‘rendering’ them. Maybe there is an app somewhere that would show what is being sent out?

>
> Can you share a recording of what you're hearing? May as well use my ears while they still work.

No idea. Can you do the equivalent of a screenshot for the sound?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Radix lecti = Couch potato



Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Javier Diaz-Reinoso
On 6/11/2014, at 16:49, tim Rowledge <[hidden email]> wrote:
>
>
> On 06-11-2014, at 12:50 PM, Casey Ransberger <[hidden email]> wrote:
>
>> What's making the actual sound come out? Sounds like you've figured the MIDI part out, and that isn't it. Are you sure it isn't some kind of default sound with an envelope or maybe even just a ramp of reverb to make crappy MIDI stuff sound a little more hot?
>
> I have no idea where it goes after the midi plugin; there must be a default midi-capable sound synthesizer built in to the OS X stuff I guess; purely by analogy from the ‘fun’ we’re having making a similar thing work on linux for the Pi.
>
In the mac QuickTime can play MIDI, in my machine:

MidiPrimTester new getPortList
MIDI Ports:
        0: QuickTime MIDI (out)

>>
>> Seems pretty obvious that what you're hearing is in the VM. I'm just wondering which musician put it there and why. Fascinating, anyway.
>
> I dunno. MIDI control bytes are going out and something is ‘rendering’ them. Maybe there is an app somewhere that would show what is being sent out?
>
>>
>> Can you share a recording of what you're hearing? May as well use my ears while they still work.
>
> No idea. Can you do the equivalent of a screenshot for the sound?
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Useful Latin Phrases:- Radix lecti = Couch potato
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Bert Freudenberg
In reply to this post by timrowledge

On 06.11.2014, at 22:49, tim Rowledge <[hidden email]> wrote:

>
> On 06-11-2014, at 12:50 PM, Casey Ransberger <[hidden email]> wrote:
>
>> What's making the actual sound come out? Sounds like you've figured the MIDI part out, and that isn't it. Are you sure it isn't some kind of default sound with an envelope or maybe even just a ramp of reverb to make crappy MIDI stuff sound a little more hot?
>
> I have no idea where it goes after the midi plugin; there must be a default midi-capable sound synthesizer built in to the OS X stuff I guess; purely by analogy from the ‘fun’ we’re having making a similar thing work on linux for the Pi.
>
>>
>> Seems pretty obvious that what you're hearing is in the VM. I'm just wondering which musician put it there and why. Fascinating, anyway.
>
> I dunno. MIDI control bytes are going out and something is ‘rendering’ them. Maybe there is an app somewhere that would show what is being sent out?
>
>>
>> Can you share a recording of what you're hearing? May as well use my ears while they still work.
>
> No idea. Can you do the equivalent of a screenshot for the sound?
Use SoundFlower with the recording software of your choice.
http://rogueamoeba.com/freebies/soundflower/

Here is what I hear:
https://dl.dropboxusercontent.com/u/9643745/tmp/scratchmidi.mp4

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

timrowledge

On 06-11-2014, at 2:48 PM, Bert Freudenberg <[hidden email]> wrote:

> Here is what I hear:
> https://dl.dropboxusercontent.com/u/9643745/tmp/scratchmidi.mp4

Yup, that’s it. A little louder each note until levelling off.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Bad command or file name.  Go stand in the corner.



Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Bert Freudenberg
On 07.11.2014, at 00:49, tim Rowledge <[hidden email]> wrote:

On 06-11-2014, at 2:48 PM, Bert Freudenberg <[hidden email]> wrote:

Here is what I hear:
https://dl.dropboxusercontent.com/u/9643745/tmp/scratchmidi.mp4

Yup, that’s it. A little louder each note until levelling off.

Check your soundcard / amp / speakers / ears / brain. It does not get any louder.

First note:


Last note:


Just drop the mp4 into Audacity if you don't believe me ;)

- Bert -




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

timrowledge

On 06-11-2014, at 4:31 PM, Bert Freudenberg <[hidden email]> wrote:

> On 07.11.2014, at 00:49, tim Rowledge <[hidden email]> wrote:
>
>> On 06-11-2014, at 2:48 PM, Bert Freudenberg <[hidden email]> wrote:
>>
>>> Here is what I hear:
>>> https://dl.dropboxusercontent.com/u/9643745/tmp/scratchmidi.mp4
>>
>> Yup, that’s it. A little louder each note until levelling off.
>
> Check your soundcard / amp / speakers / ears / brain. It does not get any louder.

It really truly does on my iMac. I don’t have any clever sound software so far as I know, iTunes isn’t doing an crossfading that could confuse things, very confusing.

I recorded your sample playing on my iMac - which Bridget agrees clearly gets louder, so it’s not just my tool-mangled ears - and put it here -
https://copy.com/TntqoL6EBUQkYNth


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Quality assurance: A way to ensure you never deliver shoddy goods accidentally.



Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Levente Uzonyi-2
On Thu, 6 Nov 2014, tim Rowledge wrote:

>
> On 06-11-2014, at 4:31 PM, Bert Freudenberg <[hidden email]> wrote:
>
>> On 07.11.2014, at 00:49, tim Rowledge <[hidden email]> wrote:
>>
>>> On 06-11-2014, at 2:48 PM, Bert Freudenberg <[hidden email]> wrote:
>>>
>>>> Here is what I hear:
>>>> https://dl.dropboxusercontent.com/u/9643745/tmp/scratchmidi.mp4
>>>
>>> Yup, that’s it. A little louder each note until levelling off.
>>
>> Check your soundcard / amp / speakers / ears / brain. It does not get any louder.
>
> It really truly does on my iMac. I don’t have any clever sound software so far as I know, iTunes isn’t doing an crossfading that could confuse things, very confusing.
>
> I recorded your sample playing on my iMac - which Bridget agrees clearly gets louder, so it’s not just my tool-mangled ears - and put it here -
> https://copy.com/TntqoL6EBUQkYNth
That sound clearly gets louder over time. I suspect that your OS or sound
card has a built-in compressor or limiter, which affects the output
volume. Try increasing the volume of the midi playback and see if the
effect goes away.

Levente

>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Quality assurance: A way to ensure you never deliver shoddy goods accidentally.
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Karl Ramberg
In reply to this post by Bert Freudenberg
I suspect that the sound mixing is adding the sounds together in the buffer till it maxes out in loudness. Sound mixing is pretty much the same for all sounds playing simultaneously.
 
 
Karl
 

On Thu, Nov 6, 2014 at 11:09 AM, Bert Freudenberg <[hidden email]> wrote:

On 06.11.2014, at 08:53, karl ramberg <[hidden email]> wrote:

I have heard this sometimes myself on various platforms. Repeating a sound in Etoys (having a sound play in a ticking script) sometimes sturates the sound channel and it gets really loud and sounds awfull.
I'm not sure if this is a problem in the plugins or in the sound player classes. 

This is simply because triggering the same Etoys sound while it is still playing just adds another copy of it to the output stream. Since Etoys sounds are about a second long, and you tick at least 8 times a second, this adds the same sound 8 times on top of itself. Yes it sounds awful.

The Right Thing to do would be to keep track of the sound being played by each Etoys object, and loop the sound as long as it is being re-triggered. The fire-and-forget method in place now is just much simpler.

A second thing making it worse is that Reverb is on by default, at a pretty high level. While it makes the sounds appear fuller if played alone, it exacerbates the effect when playing the same sound over and over. This is not really the Reverb's fault though. 

- Bert -







Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

Bert Freudenberg
In reply to this post by Levente Uzonyi-2
On 07.11.2014, at 02:38, Levente Uzonyi <[hidden email]> wrote:

> On Thu, 6 Nov 2014, tim Rowledge wrote:
>
>> I recorded your sample playing on my iMac - which Bridget agrees clearly gets louder, so it’s not just my tool-mangled ears - and put it here -
>> https://copy.com/TntqoL6EBUQkYNth
>
> That sound clearly gets louder over time. I suspect that your OS or sound card has a built-in compressor or limiter, which affects the output volume. Try increasing the volume of the midi playback and see if the effect goes away.

It's weird, yes, but clearly not a Squeak problem but with your system.

How did you record this?

- Bert -






smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Mac midi sound weirdness - it gets louder for first few notes.

timrowledge

On 07-11-2014, at 2:57 AM, Bert Freudenberg <[hidden email]> wrote:

> On 07.11.2014, at 02:38, Levente Uzonyi <[hidden email]> wrote:
>
>> On Thu, 6 Nov 2014, tim Rowledge wrote:
>>
>>> I recorded your sample playing on my iMac - which Bridget agrees clearly gets louder, so it’s not just my tool-mangled ears - and put it here -
>>> https://copy.com/TntqoL6EBUQkYNth
>>
>> That sound clearly gets louder over time. I suspect that your OS or sound card has a built-in compressor or limiter, which affects the output volume. Try increasing the volume of the midi playback and see if the effect goes away.

It’s an iMac. It doesn’t have strange sound cards with arcane settings you fiddle with. It just plays things.

>
> It's weird, yes, but clearly not a Squeak problem but with your system.
>
> How did you record this?
Quicktime to record the audio coming out of the speakers, so you heard what I heard.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Death to all fanatics!