Fender Mustang Amplifiers?

Started by Atros, August 28, 2012, 01:30:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vtgearhead

Quote from: ttbit on August 28, 2016, 08:18:34 PM
snhirsch: My program is still single-threaded, but I found by tweaking the usb routines, it runs rather well.  I now know why Plug didn't work.  I looked at your code and may study it some more to see about multi-threading and maybe if I need to get deeper into amp control. 

Writing reliable multi-threaded code can be a challenge in any language and C/C++ pthreads is a particularly verbose and tricky environment.  If you have any specific questions I'll be glad to answer them.

Quote
I don't look at the &received value like you do, but I do look for the -7 timeout value and re-check "x" number of times.  I can actually bring the usb_timeout value to 200 (I assume we all had it at 500 from Plug? :)) because of this.  It makes things pretty responsive in a single thread.  Now...as I get deeper, if I need something faster, I'll re-write.  Of course, if there are errors, it will slow down significantly, so I made the retry variable.  I can tell you....it is not the "X" environment causing the latency.  As is, the amp is now responsive.  There is no drag.  I assume amp changes at the amp panel, so...

Not sure how you made a single-threaded application deal reliably with asynchronous changes made at the amplifier, but that's a good accomplishment.  I'm guessing:  If the return pipe from the amp "chokes" because messages haven't been read that causes outgoing timeouts?  So when you see an outgoing timeout you clear the incoming data?  Sometimes a brute-force approach can be made to work.  The one doubt I have is how to handle incoming tuner state messages.  Are you able to get stable operation when the amp is manually put into tuner mode?

Quote
Also....I figured all the latency was from "receive"!  Eye opener!

Not following - sorry.

Elantric

#176

ttbit

Quote from: sixeight on August 28, 2016, 11:00:48 PM
That is looking really good, Don. I would love to incorporate your program in the VController. Will you be sharing your code?

I am also curious where you do most of the processing: on the Arduino or on Android?

You mean my Arduino code?  I plan to release at least some of that.  What are you interested in?

Because of the limited memory on the Arduino, I decided to do the processing on the Android.  Now that I am writing on the Pi, and I like C++, I have been doing more on the pi.  I wrote a pretty complex Arduino app some years ago that used ALL of the memory.  I had to really learn to be tight with bits.  The more I am working with this, the more I am thinking I don't really need to store THAT much data on the Arduino, like I was originally thinking.  I may do more with the Arduino before I am done.

Thanks.

ttbit

#178
Quote from: snhirsch on August 29, 2016, 05:04:47 AM
Writing reliable multi-threaded code can be a challenge in any language and C/C++ pthreads is a particularly verbose and tricky environment.  If you have any specific questions I'll be glad to answer them.

Very kind of you.  I will wait until I am really frustrated and bother you. :)

QuoteNot sure how you made a single-threaded application deal reliably with asynchronous changes made at the amplifier, but that's a good accomplishment.  I'm guessing:  If the return pipe from the amp "chokes" because messages haven't been read that causes outgoing timeouts?  So when you see an outgoing timeout you clear the incoming data?  Sometimes a brute-force approach can be made to work.  The one doubt I have is how to handle incoming tuner state messages.  Are you able to get stable operation when the amp is manually put into tuner mode?

I am running a loop that is always looking for packets from the amp and the BT.  What I found, by trying to break it, is that if I go crazy with the wheel on the amp, it never loses a packet, AND the amp is not lagging...not anything worth complaining about.  It lands where you want it quickly.  Now, the amp "skips" some of the preset output.  It doesn't skip packets.  I haven't seen it send say... a 05 or 06 and then go to 04.  It does the 04,05,06,07... every time.  It just skips entire presets, as it should, as you flew by them anyway.  I process the packets 04-09 right now too, and it didn't blow up.  I think the key is being able to lower that timeout.  At 500 ms, I don't think this would be possible.

I went into tuner mode and it doesn't seem to glitch.  I never tried that before. :)  I see a lot of 0b packets with a few bytes of interest flying by.  No ill effect on use of it with my guitar.  Turned tuner off, saw an 0a packet and all was normal.  The BT receive handler I am using for Android is slow, so I hadn't planned on this "feature", but now after seeing the packets... hahaha  Who knows.

Quote
Not following - sorry.

I don't get timeouts from the amp to the pi.  Not many anyway.  It times out on packets from the pi to the amp (A LOT). That was what made me believe I could do this in a single thread.  I was assuming it was missing packets flying in...nope....  I ran that timeout up to 1 second and would still see an error, now and then!!

vtgearhead

Quote from: ttbit on August 30, 2016, 05:39:28 PM
I am running a loop that is always looking for packets from the amp and the BT.  What I found, by trying to break it, is that if I go crazy with the wheel on the amp, it never loses a packet, AND the amp is not lagging...not anything worth complaining about.  It lands where you want it quickly.  Now, the amp "skips" some of the preset output.  It doesn't skip packets.  I haven't seen it send say... a 05 or 06 and then go to 04.  It does the 04,05,06,07... every time.  It just skips entire presets, as it should, as you flew by them anyway.  I process the packets 04-09 right now too, and it didn't blow up.  I think the key is being able to lower that timeout.  At 500 ms, I don't think this would be possible.

Yes, I see what you are doing.  There's a high potential for deadlocks, but if you are able to timeout on both transmit and receive then these will be momentary.  Sometimes the simple approach can work quite well.  Nice job!

sixeight

#180
Quote from: ttbit on August 30, 2016, 05:16:19 PM
You mean my Arduino code?  I plan to release at least some of that.  What are you interested in?

I have several parts that I am interested in:
* The usb host part with the Fender Mustang
* The bluetooth connection with Android (code on both sides)

For the VController to give full parameter feedback, I would need to read patchnames in advance (which your app already does), and also read the effect types and states (on/off). The Vcontroller has a Teensy 3.2 as the core processor and I a raspberry pi for the connection with the Mustang, but this could also be a mini host shield.

QuoteBecause of the limited memory on the Arduino, I decided to do the processing on the Android.  Now that I am writing on the Pi, and I like C++, I have been doing more on the pi.  I wrote a pretty complex Arduino app some years ago that used ALL of the memory.  I had to really learn to be tight with bits.  The more I am working with this, the more I am thinking I don't really need to store THAT much data on the Arduino, like I was originally thinking.  I may do more with the Arduino before I am done.

So you have Arduino, Raspberry Pi and Android? Now I am lost. Do you have some documentation on the setup?

ttbit

Quote from: sixeight on August 31, 2016, 05:25:20 AM
I have several parts that I am interested in:
* The usb host part with the Fender Mustang
* The bluetooth connection with Android (code on both sides)

I am still working on the Android code.  Although it works, it is a mess right now.  I may be doing some re-writing and I have been changing what bits get sent back and forth on a weekly basis.  Maybe we can communicate offline.  I am new to the forum, but I will see if I can PM you my email or something, if you like.

Quote
So you have Arduino, Raspberry Pi and Android? Now I am lost. Do you have some documentation on the setup?

Yes.  The youtube video was using an Arduino and host shield.  I was looking at a way to offer this to people in the easiest way possible for them and decided to buy a Pi and mess around with it.  I now have code working on the Pi at the same functional level.  In this process, I changed my Android code quite a bit.

It is all happening so fast. :)  I would like to get this out to some people for them to play with and test.

ttbit

Quote from: snhirsch on August 31, 2016, 04:29:30 AM
Yes, I see what you are doing.  There's a high potential for deadlocks, but if you are able to timeout on both transmit and receive then these will be momentary.  Sometimes the simple approach can work quite well.  Nice job!

I didn't think I could get it to work this way, but....hey...  I normally go for the simplest route.  After talking to Robert, he made me think that my Android code is too complicated.  Now...it likely is, as it started with sample Google code and is multi-threaded.  This has already caused me issues.

vtgearhead

#183
Just realized that the list of mustang-midi package dependencies on GitHub was incomplete. A fixed version has been uploaded along with a second fix to the installer script.  If anyone has been trying to get the automatic bridge startup to work and not having success, please pull an update, rebuild and try again?

On the bright side, the auto-start framework and threaded code seem to work fine on Raspberry Pi.  The last time I worked with the Pi I experienced USB problems.  So far, not seeing that now.   

Update: I have made some major updates to the more newbie-oriented installation Wiki that cover configuration of the auto-start framework and a new single-command install script.  I would really appreciate it if someone out could try a run-through based on these instructions and let me know if you hit any problems?

Also, for the coders among us, I have added a new README.testing document to explain use of the Python test script. Please note that you will need to install some additional packages (mentioned in the main README.md) in order to run the tests. The tests are probably not very useful for folks running the smaller amps (e.g. Mustang I or II) since they rely heavily on the LCD display.


https://github.com/snhirsch/mustang-midi-bridge



tomkiefer

Hello! I was about to start a new thread as this one is a couple years old and 8 pages now, and it's taken a few twists and turns on its own, but hey, I'll try to keep it going  ;D

I am the proud owner of a lightly used Mustang II of just over a year ago, and it brings smiles every time I plug in; easily the best 100 bucks I've spent in a long time. I would love to incorporate this into my live rig - we use in-ear monitors so stage volume is not an issue, and an E609 or an SM57 will bring these sweet tones to life. My current rig is all virtual: guitars into a Presonus Firebox into a MacBook running Logic Pro 9 and its Amp Designer and S-Gear plugins and effects as required. We run backing tracks and I have all the guitar patch and effects changes automated in Logic, as well I have a Boss GT3 to manually trigger patch and effects changes for non-tracked tunes, using the MIDI IN on the Firebox. All has worked well for several years, but I miss the amp and speaker "air" from the good old days (haha). I have loved not toting an amp, but this little Fender is about an easy to tote as one can ask for, given the big sounds it can produce. I also like the fact that it is very quiet, even on high gain, and the noise gate (if even required) does not impede the natural sustain of the guitar. The Mustang just seems to let the tones ring on until the strings stop vibrating; very dynamic too. Anyone that's used the gates in Logic (and even S-Gear) for distorted guitar tones will know that they can clamp down too easily and cut off the sound, and I've spent endless time trying to tweak them.

Next, my hats off to the hard work by a handful of intelligent and dedicated individuals who went out of their way to open up this amp series into the world of MIDI. Obviously you guys caught the bug from these special amps and felt the long hours worth your efforts, and to this I offer a most sincere "THANK YOU!".

Considering the lengths I went to with my current rig, I would want to up my game and bring not only these great Mustang tones to the stage, but also take my rig to another level. Here's my optimistic wish-list:

1) External Control of Amp Preset Changes and Effects On/Off - you guys have opened up a few options: MIDX-20 or a Linux RPi or BBx. I have at my disposal an iView Cyber PC and I'm wondering if I could run Linux on this device, that it might serve the purpose (?). Also, I presume that there's no way to leverage the MacBook in any way for this purpose, unless I were to install Linux on it, which takes away my Logic Pro capabilities (!)

2) Maintain automated preset changes and effects on/off through Logic Pro's MIDI capabilities running on a MacBook

3) Add an option for wireless MIDI control from the GT3 (or I may purchase an FCB1010) using something like the "PUC" device (but still with hardwired MIDI cable for backup). I am intrigued by foot controllers such as the AirTurn Stomp6, iRig Blueboard and Positive Grid BT4, but I'm not sure if any of these would do the trick.

4) Now here's wishful thinking: Use the amp's USB as my guitar audio interface into the MacBook/Logic Pro, whilst simultaneously interfacing the MIDI control of the amp as in #1 above. We're talking about MIDI over USB playing nicely with USB audio - is this possible? The reason for all this being: I might decide not to mic the amp for some reason, or I may want to combine mic'd tones and virtual tones to take advantage of some Logic Pro effects plugins perhaps... 

OK, I've laid it all out there - sorry for the long post!

Thanks,
Tom

admin

#187

vtgearhead

Thanks to some greatly appreciated input from the user community, I have made some fixes to the Linux Mustang MIDI bridge that allow it to build and run under newer distributions.  Current RPi 3 computers ship with Raspian 'Stretch' which brought in a number of incompatibilities.  All but one fix are at the source level, but there is one additional bit of editing required to system configuration files.  This is documented in the installation Wiki.

I really appreciate getting the feedback.  I'm no longer using the Mustang in my stage rig and would never have found or fixed any of this on my own.

https://github.com/snhirsch/mustang-midi-bridge

beatpete

OK, I just got re acquainted with my Mustang III V2. I had a Katana 50 and 100 and recently received a black face vibrolux clone which I love. I spent a couple of hours with my Katana 100 trying to get close to the vibrolux, came sort of close but no cigar. So, I got rid of the Katana. A local gut was selling a Mustang III V2 for a very reasonable price so i picked it up because I remember really liking my old one. Well. It took me about 2 minutes to find a VERY close sound to my vibrolux! I'm pumped and feel stupid for buying into the newer tech...

admin

Its true if you seek Fender tones - Katana is NOT your tool

Katana's strengths are its emulation of an EL34 based late 1960's Marshall 

mooncaine

Quote from: beatpete on October 20, 2018, 10:34:32 AM
OK, I just got re acquainted with my Mustang III V2. I had a Katana 50 and 100 and recently received a black face vibrolux clone which I love. I spent a couple of hours with my Katana 100 trying to get close to the vibrolux, came sort of close but no cigar. So, I got rid of the Katana. A local gut was selling a Mustang III V2 for a very reasonable price so i picked it up because I remember really liking my old one. Well. It took me about 2 minutes to find a VERY close sound to my vibrolux! I'm pumped and feel stupid for buying into the newer tech...
Please tell me more about your vibrolux-ish patch. I have the same Mustang and I'd love to be able to dial up a good vibrolux on it.

beatpete

#192
It's not quite the same but it comes closer than any other modelling amp I've tried. I've uploaded a fuse screenshot of the patch. Notice I have the compressor on post amp, I like it off as well but on it adds a little of that my vibrolux attack.

mooncaine


admin