cardonabits / haxo-hw

Haxophone, an electronic musical instrument that resembles a saxophone
Other
618 stars 20 forks source link

Line out missing #61

Closed Utopiah closed 10 months ago

Utopiah commented 10 months ago

Hi, just received my haxophone via CrowdSupply. Looks neat but I'm wondering if the line out is supposed to be like that :

image

Should I solder it back? Can I use it without thanks to e.g RPi jack out anyway?

Edit : seems others had a similar problem, cf https://www.crowdsupply.com/cardona-bits/haxophone/updates/orders-fulfilled-code-info-and-feature-requests

Utopiah commented 10 months ago

Alternatively I have an Akai Pro MPK Mini mkII, could I use it as described in "USB MIDI output (only on Raspberry Pi Zero). Connect the Haxophone to a MIDI synth over USB and use it as a regular MIDI instrument." and if so how, "just" plugging in RPi Zero USB?

jcard0na commented 10 months ago

Hi @Utopiah

It looks like your Haxophone was damaged in transit😢. You can either solder it back or reach out to Crowd Supply for are replacement. My apologies for that!

As for USB MIDI, it should work if your synth recognizes USB MIDI devices. We tested with Garage Band on a Mac, see this update

Utopiah commented 10 months ago

No worries it happens. I'm not great at soldering if it's those 3 points and not too heat sensitive I might manage. Worth a try and if it fails I fallback to CrowdSupply, what do you think?

PS: thanks for the MIDI pointer, I'll try with LMMS on Linux, worked with the Akay before. Quick question, does this MIDI example work with the RPi 3 image too?

jcard0na commented 10 months ago

No worries it happens. I'm not great at soldering if it's those 3 points and not too heat sensitive I might manage. Worth a try and if it fails I fallback to CrowdSupply, what do you think?

Great. Yes, that part is easy to solder. And from the picture you posted, there does not seem to be any damage to the pad. If you have soldering flux, soldering would be even easier, but that is not a hard requirement. Just remember to wipe it out when finished. Let me know how it goes! 🤞

Utopiah commented 10 months ago

does this MIDI example work with the RPi 3 image too?

seems not, cf "I released for the Pi3 https://bit.ly/haxo-rpi3 does not run the latest version of haxo-rs. In particular you are missing USB Midi support " in https://github.com/cardonabits/haxo-hw/issues/53#issuecomment-1868456613

Edit: confirmed in " The Raspberry Pi 3 image does not have USB MIDI enabled because the Pi 3 does not implement the necessary USB On-The-Go functionality" https://www.crowdsupply.com/cardona-bits/haxophone/updates/orders-fulfilled-code-info-and-feature-requests

jcard0na commented 10 months ago

I forgot to answer that second question, but looks like you found your answer 😎 You might find this discussion interesting. Some people are interested in getting Midi working on the RPi 3/4 with a USB MIDI adapter. But that feature is just at the early discussion stage. If you want USB MIDI now you should stick with the Zero.

BTW, as you saw on the latest update, you are not alone with the line-out problem. And your attitude has been just as good. Thank you! 🙏

Utopiah commented 10 months ago

Let's see if that works... photo1704471397

Utopiah commented 10 months ago

No sound on keypress but I hear static coming out of headphones so... a good step?

Will plug HDMI to get some logs.

Utopiah commented 10 months ago

Well I'm getting a haxophone login prompt. What is the login/password by default (pi/raspberry didn't work, no password from https://github.com/cardonabits/haxo-rs/blob/main/docs/zero-setup.md#L20 didn't work either)? I didn't see that in the documentation linking to the images.

I imagine I should try to investigate with journalctl?

Maybe try to play sound with fluidsynth?

Definitely try to have ssh so that I can login from another machine to debug.

Edit: ah, found it, login pi, password haxophone

jcard0na commented 10 months ago

Hi @Utopiah,

Soldering looks acceptable, probably the upper pad could use a bit more solder. I suppose static is OK, but if you did not get a startup chime, that's not ok.

The default login is user:pi pwd:haxophone, yes.

Yes, journalctl -u haxo should be the starting point to understand. If there are no software issues, then it's the hardware that is damaged.

Playing a sound is easy:

sudo systemctl stop haxo 
aplay /usr/share/sounds/alsa/Front_Right.wav

ssh or serial console is what I normally use to debug.

Utopiah commented 10 months ago

I'm connected via ssh and getting from journalctl -u haxo

getting

pi@haxophone:~ $ journalctl -u haxo
-- Journal begins at Tue 2023-10-03 13:33:03 BST, ends at Fri 2024-01-05 17:37:29 GMT. --
Oct 03 13:33:08 haxophone systemd[1]: Started haxophone.
Oct 03 13:33:14 haxophone haxo001[456]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 13:33:14 haxophone haxo001[456]: [2023-10-03T12:33:14Z WARN  haxo001::synth] Setting audio.driver in fluidsynth failed
Oct 03 13:33:14 haxophone haxo001[456]: [2023-10-03T12:33:14Z WARN  haxo001::synth] Setting audio.periods in fluidsynth failed
Oct 03 13:33:14 haxophone haxo001[456]: [2023-10-03T12:33:14Z WARN  haxo001::synth] Setting audio.period-size in fluidsynth failed
Oct 03 13:33:14 haxophone haxo001[456]: [2023-10-03T12:33:14Z WARN  haxo001::synth] Setting audio.realtime-prio in fluidsynth failed
Oct 03 13:33:14 haxophone haxo001[456]: Synth created
Oct 03 13:33:14 haxophone haxo001[456]: Starting haxophone...
Oct 03 13:35:17 haxophone systemd[1]: Stopping haxophone...
Oct 03 13:35:17 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 13:35:17 haxophone systemd[1]: Stopped haxophone.
Oct 03 13:35:17 haxophone systemd[1]: haxo.service: Consumed 43.222s CPU time.
-- Boot 05d669daf1be4739b93ec351fc294a2c --
Oct 03 13:35:23 haxophone systemd[1]: Started haxophone.
Oct 03 13:35:29 haxophone haxo001[455]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 13:35:29 haxophone haxo001[455]: [2023-10-03T12:35:29Z WARN  haxo001::synth] Setting audio.driver in fluidsynth failed
Oct 03 13:35:29 haxophone haxo001[455]: [2023-10-03T12:35:29Z WARN  haxo001::synth] Setting audio.periods in fluidsynth failed
Oct 03 13:35:29 haxophone haxo001[455]: [2023-10-03T12:35:29Z WARN  haxo001::synth] Setting audio.period-size in fluidsynth failed
Oct 03 13:35:29 haxophone haxo001[455]: [2023-10-03T12:35:29Z WARN  haxo001::synth] Setting audio.realtime-prio in fluidsynth failed
Oct 03 13:35:29 haxophone haxo001[455]: Synth created
Oct 03 13:35:29 haxophone haxo001[455]: Starting haxophone...
Oct 03 13:35:43 haxophone systemd[1]: Stopping haxophone...
Oct 03 13:35:43 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 13:35:43 haxophone systemd[1]: Stopped haxophone.
Oct 03 13:35:43 haxophone systemd[1]: haxo.service: Consumed 5.391s CPU time.
Oct 03 13:55:13 haxophone systemd[1]: Started haxophone.
Oct 03 13:55:13 haxophone haxo001[779]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 13:55:13 haxophone haxo001[779]: [2023-10-03T12:55:13Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 13:55:13 haxophone haxo001[779]: Synth created
Oct 03 13:55:13 haxophone haxo001[779]: [2023-10-03T12:55:13Z INFO  haxo001::midi] Choosing the only available midi output port: Midi Through:Midi Through Port-0 14:0
Oct 03 13:55:13 haxophone haxo001[779]: Starting haxophone...
Oct 03 13:57:16 haxophone systemd[1]: Stopping haxophone...
Oct 03 13:57:17 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 13:57:17 haxophone systemd[1]: Stopped haxophone.
Oct 03 13:57:17 haxophone systemd[1]: haxo.service: Consumed 45.273s CPU time.
-- Boot 6d6e45b5fd1b4ecd981a839eb84d3553 --
Oct 03 13:57:22 haxophone systemd[1]: Started haxophone.
Oct 03 13:57:28 haxophone haxo001[461]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 13:57:28 haxophone haxo001[461]: [2023-10-03T12:57:28Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 13:57:28 haxophone haxo001[461]: Synth created
Oct 03 13:57:29 haxophone haxo001[461]: [2023-10-03T12:57:29Z INFO  haxo001::midi] Choosing the only available midi output port: Midi Through:Midi Through Port-0 14:0
Oct 03 13:57:29 haxophone haxo001[461]: Starting haxophone...
Oct 03 14:05:25 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:05:25 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:05:25 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:05:25 haxophone systemd[1]: haxo.service: Consumed 3min 5.823s CPU time.
Oct 03 14:05:35 haxophone systemd[1]: Started haxophone.
Oct 03 14:05:35 haxophone haxo001[837]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:05:35 haxophone haxo001[837]: [2023-10-03T13:05:35Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:05:35 haxophone haxo001[837]: Synth created
Oct 03 14:05:35 haxophone haxo001[837]: Starting haxophone...
Oct 03 14:06:38 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:06:38 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:06:38 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:06:38 haxophone systemd[1]: haxo.service: Consumed 24.932s CPU time.
-- Boot a5c8a80f3cf547ae98f37123918cb92f --
Oct 03 14:06:44 haxophone systemd[1]: Started haxophone.
Oct 03 14:06:50 haxophone haxo001[450]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:06:50 haxophone haxo001[450]: [2023-10-03T13:06:50Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:06:50 haxophone haxo001[450]: Synth created
Oct 03 14:06:50 haxophone haxo001[450]: Starting haxophone...
Oct 03 14:10:20 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:10:20 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:10:20 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:10:20 haxophone systemd[1]: haxo.service: Consumed 29.071s CPU time.
-- Boot 9b389862133b4cc4b22fa698f7424f61 --
Oct 03 14:10:25 haxophone systemd[1]: Started haxophone.
Oct 03 14:10:31 haxophone haxo001[456]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:10:31 haxophone haxo001[456]: [2023-10-03T13:10:31Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:10:31 haxophone haxo001[456]: Synth created
Oct 03 14:10:31 haxophone haxo001[456]: Starting haxophone...
Oct 03 14:11:16 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:11:16 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:11:16 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:11:16 haxophone systemd[1]: haxo.service: Consumed 11.361s CPU time.
-- Boot 9fa88d0377554bb9bd4472d5fe8b833f --
Oct 03 14:14:59 haxophone systemd[1]: Started haxophone.
Oct 03 14:15:05 haxophone haxo001[454]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:15:05 haxophone haxo001[454]: [2023-10-03T13:15:05Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:15:05 haxophone haxo001[454]: Synth created
Oct 03 14:15:05 haxophone haxo001[454]: Starting haxophone...
Oct 03 14:16:38 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:16:38 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:16:38 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:16:38 haxophone systemd[1]: haxo.service: Consumed 21.966s CPU time.
Oct 03 14:18:13 haxophone systemd[1]: Started haxophone.
Oct 03 14:18:13 haxophone haxo001[802]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:18:13 haxophone haxo001[802]: [2023-10-03T13:18:13Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:18:13 haxophone haxo001[802]: Synth created
Oct 03 14:18:13 haxophone haxo001[802]: Starting haxophone...
Oct 03 14:18:21 haxophone systemd[1]: Stopping haxophone...
Oct 03 14:18:21 haxophone systemd[1]: haxo.service: Succeeded.
Oct 03 14:18:21 haxophone systemd[1]: Stopped haxophone.
Oct 03 14:18:21 haxophone systemd[1]: haxo.service: Consumed 3.243s CPU time.
-- Boot 40727f667a2443c9823c42bee1809e81 --
Oct 03 14:19:08 haxophone systemd[1]: Started haxophone.
Oct 03 14:19:13 haxophone haxo001[552]: fluidsynth: warning: SDL2 not initialized, SDL2 audio driver won't be usable
Oct 03 14:19:13 haxophone haxo001[552]: [2023-10-03T13:19:13Z INFO  haxo001::alsa] Found alsa card MAX98357A
Oct 03 14:19:14 haxophone haxo001[552]: Synth created
Oct 03 14:19:14 haxophone haxo001[552]: Starting haxophone...
Utopiah commented 10 months ago

sudo systemctl stop haxo stops the static and aplay /usr/share/sounds/alsa/Front_Right.wav does work (on the right headphone) and aplay /usr/share/sounds/alsa/Front_Left.wav does work too but also on the right headphone (nothing on left, not sure if stereo proper as it says Signed 16 bit Little Endian, Rate 48000 Hz, Mono)

jcard0na commented 10 months ago

Oh, sound is good news. You should hear audio on both speakers so there could be a problem with the soldering (can you maybe add some solder to that top pad?) or the jack insertion (is it fully inserted?).

Utopiah commented 10 months ago

Indeed while trying to play http://www.aoakley.com/articles/stereo-test.mp3 I get only the left side. Will resolder with a bit more on the top pad. I was a bit cautious to avoid overheating. Will try again and post back results, thanks for the help!

Utopiah commented 10 months ago

unfortunately doesn't seem to help, and yes the jack is all the way through and tested on another setup

image

Utopiah commented 10 months ago

The headphones I'm using for test have 3 blacklines, could it also be related? I see that other on jack have only 2 black lines.

Edit: seems not, same result with other headphones.

jcard0na commented 10 months ago

Three lines seem to be headphones with microphone. Better without, but that should not be a problem.
My theory now is that the impact that broke the connector may have damaged the trace that links the two channels (the line going from T to R)

image

If you feel like testing that theory, you could try to short those two pads. What do you think? Screenshot from 2024-01-05 18-40-54

Utopiah commented 10 months ago

Should I get the multimeter out?

jcard0na commented 10 months ago

Should I get the multimeter out?

That would be another way to test the theory... there should be zero resistance between those pads.

Utopiah commented 10 months ago

I'm reading 0 between those pads.

jcard0na commented 10 months ago

OK, so then the problem is upstream from those pads (i.e. from the connector toward the speaker): no software issue can silence one channel but not the other.

If you've confirmed that both channels on the headphones work, the problem must be in the jack-to-connector connection. I'm not sure if you have any way to check that. I do this using bare minijack connectors and a multimeter. You have the latter, but I would not expect you to have a stripped minijack laying around...

image

Maybe you can try to clean up the inside of the connector with alcohol, and remove any cobwebs you see... :spider_web:

But you have done more than what one would expect with a unit that shows clear signs of hardware damage. Feel free to stop your investigations and return the unit!

Utopiah commented 10 months ago

Unfortunately I don't have any stripped minijack but the piece itself, the jack-to-connector, looks pretty clean from what I can see.

Anyway I appreciate a lot your help but this seems to be beyond my hardware ability so I contacted CrowdSupply for RMA. Hopefully you can investigate and learn from the source of the problem.

In the meantime though, because I assume it will take a while and I'm quite excited by the project, I would really like to tinker more. I don't mind if there is some input lag, or even mono, so what do you believe would be the most practical path to get some sound of it it as-is?

Could it be

Sadly all the RPi Zero I have (2x v1 and 1x v2) are without pins so I can't use them. I'll look for connector because I might have a set somewhere, if so then I could at least tinker with the hardware I have now before the RMA as a MIDI device for LMMS, or even XR as I did some prototypes about that in the past for pedagogical exploration.

jcard0na commented 10 months ago

Hi @Utopiah

Yes, it seems like an RMA is the sensible approach now.

Just so I understand where we stand...

The logs you sent seem to indicate the haxo application starts successfully. And you confirmed that you have audio out of one channel with aplay.

Were you ever able to play the haxophone and hear audio? At a minimum, blowing through the neck should play a concert B note.

Oh, wait...

Sadly all the RPi Zero I have (2x v1 and 1x v2) are without pins so I can't use them.

...but earlier on you asked about the RPi Zero and then the RPi3. Which RPi are you using?

(If the RPi3, you should be aware of #37 and the proposed workaround)

Utopiah commented 10 months ago

RPi3 and sadly I did cover with some tape before even trying. I might use more tape or even a thin piece of plastic, maybe it was still conductive somehow.

Now... don't laugh (or cry) but... I pressed button because I was thinking piano, I didn't blow in at the same time! :D

I just put back the setup and... it works! Namely when I blow in AND press keys, I can hear sound, even in both headphone sides (no idea how come). When I do press keys though it doesn't change the note except sometimes while pressing column 2 key 1 (the light pink one on my setup).

It looks like RMA might not be needed after all, what do you think? How could I run a proper diagnosis from here?

jcard0na commented 10 months ago

:exploding_head: :

Now... don't laugh (or cry) but... I pressed button because I was thinking piano, I didn't blow in at the same time! :D

:rofl: Actually this is a documentation error... Instead of just 7. Play, the last step in the Quick Start guide should explain that blowing air is required :wind_face: I'll make that change!

The next step would be to go over all the fingerings, and noting which ones do not work (if any). One player had an issue with a key that was stuck open, and it was fixed just by trying all the fingerings. Maybe you are experiencing something similar?

jcard0na commented 10 months ago

Oh, and yes, hold on the RMA for now until we've tried all the fingerings.

Utopiah commented 10 months ago

Luckily for us both it's the weekend so RMA is paused for now. I was even able to make a tiny chambre concert to amazed guests. A single note was tricky but the crowd was enthusiastic so ... concert approved!

Jokes aside I'll go through the fingerings and comment back, eager to see where this all goes but admittedly now the limiting factor is my skill! (and yes to be blunt also documentation but we can solve that easily through discussions and issues)

jcard0na commented 10 months ago

Thanks for your patience and perseverance in working through all the kinks!

jcard0na commented 10 months ago

Closing this, as it seems like you have resolved the issue. Thanks!