ElectricMotorcycleForum.com

General Category => Pics and Vids => Topic started by: Electric Cowboy on January 26, 2014, 03:50:02 AM

Title: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on January 26, 2014, 03:50:02 AM
First on board test of latest iteration.

https://www.youtube.com/watch?v=Lgv6GIrWWq0 (https://www.youtube.com/watch?v=Lgv6GIrWWq0)
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Richard230 on January 26, 2014, 04:10:03 AM
I think that sound would have my neighbors throwing rocks at me as I ride off in the morning.  They seem to like my Zero's lack of noise.   ;)
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on January 26, 2014, 05:21:54 AM
Lol 1 of mine knows I'm trying to comply with Pikes peaks regs. So a few less rocks. That's a few less rocks for me.
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Justin Andrews on January 30, 2014, 12:11:41 AM
Have you considered using a form of granular synthasis to create the sound for your bike?
You could get a lot more natural sounding engine tone.
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: BrianTRice@gmail.com on January 31, 2014, 02:17:04 AM
I'll chime in with a vote in favor as long as the final sound capabilities don't make people cringe. :)
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on January 31, 2014, 03:51:07 AM
Have you considered using a form of granular synthasis to create the sound for your bike?
You could get a lot more natural sounding engine tone.

Yeah, I have had much better and more natural sounds, unfortunately, Pikes Peak Requires 120 DB at 1 meter (3 feet)...

So sounding good and not weighing a ton are out the window.

This iteration have cut the weight to 1/5 of what it was last year at pikes peak as well.
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: NoiseBoy on January 31, 2014, 04:49:36 AM
Have you tried putting a speaker/horn across a phase on the motor?  It sounds horrific but you wouldnt need any extra kit.
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on January 31, 2014, 05:12:54 AM
Have you tried putting a speaker/horn across a phase on the motor?  It sounds horrific but you wouldnt need any extra kit.
No I haven't tried that yet.

The below is dangerious and could kill you, your loved ones, your pets, neighbors,  your garage wall and your bike, so don't try this at home or anywhere else for that matter unless you have a good lawyer, or really know what you are doing...  :P

What I am doing for now is running the throttle to a micro-controller in parallel with sending it to the required sensor, passing that through an algorithm that processes both the throttle position and motor RPM to create a modulated pwm square wave.

Again I would like to reiterate the danger of doing this without the proper knowledge required as I have nearly killed myself a few times, and nearly killed Terry's wall once. I did actually kill a portion of his carpet. I tend to acquire knowledge through first hand experience though I don't recommend it to others to learn that way.  ;D

-EC
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: BSDThw on January 31, 2014, 12:12:12 PM
I had the idea to do a sound system in the beginning but never did. (for me the best way is a bicycle bell to warn bicyclists riding side by side - no racing needs like you ;D)
But I thought to use the RPM info at CAN. But I like your simple throttle idea better - you can use your throttle when the kill-switch is off - in front of the traffic lights to show that you are ready for a race ;D   
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on February 07, 2014, 12:01:23 AM
I had the idea to do a sound system in the beginning but never did. (for me the best way is a bicycle bell to warn bicyclists riding side by side - no racing needs like you ;D)
But I thought to use the RPM info at CAN. But I like your simple throttle idea better - you can use your throttle when the kill-switch is off - in front of the traffic lights to show that you are ready for a race ;D

I will be integrating the RPM as well. Below a certain RPM will be throttle only control.

Revving for me is holding the break and twisting up the throttle with my butt off the seat so just incase something happens I will burn out instead of shoot off. It is a great way of getting that race start sound where the gassers have the clutch in? out? and are revved up waiting to dump it.

Yeah this system is wayyy to loud for non racing, but I do turn it on occasionally, like in traffic on the 101 South bound during evening rush hour when splitting lanes heading to hollywood electrics. I will probably run it through the canyons once or twice this way to see what peoples reaction is, and how far away they can hear me.

-EC
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Justin Andrews on February 07, 2014, 10:13:02 PM
Quote
So sounding good and not weighing a ton are out the window.

Weight is not really an issue, I dare say you could run a basic granular synth algorithum on something like a Raspberry Pi (it has enough horsepower, and more than enough memory).
All you are doing is grabbing a bucket load of small audio samples (granules*) and mixing them together on the fly.

(* in the case of an engine syth, each granule is the recording of a single rotation of the desired engine at a given RPM)

The real magic is not in the runtime, its the offline process in how you take the original recording of a bike engine, rev match it, pitch flatten and break it up into granules.


Your other option, which is cheaper in terms of computational power, but requires more RAM (though again a small board like the Pi has enough memory) would be to generate the audio from recordings of the engines at various RPM's and then pitch shifting and cross fading between these bands. This also avoids the need for rare and unusual (aka expensive) tools for creating the granule data.

Heck, if you can get something like FMOD running on a Pi, then the revband implementation above is trivial, and if you could get Wwise running on a Pi, then it also comes with a granular synth system as well...
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: grindz145 on February 08, 2014, 03:01:41 AM
Haha Tron!
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on February 11, 2014, 12:40:02 PM
Quote
So sounding good and not weighing a ton are out the window.

Weight is not really an issue, I dare say you could run a basic granular synth algorithum on something like a Raspberry Pi (it has enough horsepower, and more than enough memory).
All you are doing is grabbing a bucket load of small audio samples (granules*) and mixing them together on the fly.

(* in the case of an engine syth, each granule is the recording of a single rotation of the desired engine at a given RPM)

The real magic is not in the runtime, its the offline process in how you take the original recording of a bike engine, rev match it, pitch flatten and break it up into granules.


Your other option, which is cheaper in terms of computational power, but requires more RAM (though again a small board like the Pi has enough memory) would be to generate the audio from recordings of the engines at various RPM's and then pitch shifting and cross fading between these bands. This also avoids the need for rare and unusual (aka expensive) tools for creating the granule data.

Heck, if you can get something like FMOD running on a Pi, then the revband implementation above is trivial, and if you could get Wwise running on a Pi, then it also comes with a granular synth system as well...

Pi does not have the audio power you are expecting :( It was my first go to as well. That's Why I am using arduino now. Cheaper product to get better results. I could still do the pwm on the pi but it would be more expencive for the same result as arduino.
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Justin Andrews on February 11, 2014, 01:48:16 PM
Hmm, respectfully I'm going to have to disagree with you on that one.

Still, you are getting a result you are happy with, so its all good.  :)
Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Electric Cowboy on February 11, 2014, 05:06:46 PM
Hmm, respectfully I'm going to have to disagree with you on that one.

Still, you are getting a result you are happy with, so its all good.  :)

Definately not happy with it, but it will meet requirements for Pikes Peak :)

Try processing audio based off of 2 external inputs, normalizing them then generating it every 100 ms. This level of granularity is required for me when racing.

If you can get it to sound smooth without janky cutouts in sound or failures, I would love to hear it and will study your code. I couldn't get it to work well via the audio out and thought it was the lack of a sound card causing the issue. Like I said though, please give it a shot, and if you get favorable results please share :)

If we get it working on the Raspi, I will open source it as a reward.

-Brandon


Title: Re: New sound system prototype on Foxie 2012 S ZF6
Post by: Justin Andrews on February 11, 2014, 06:02:42 PM
I'm a bit busy with writing an escape shuttle simulator for a custom simpit at the moment (for an interactive live event later this year)
But if I get some spare time, I might take a look... :)