SD player UI development

Anything to do with computer audio, hardware, software etc.
User avatar
Fran
Site Admin
Posts: 4160
Joined: Sat Jan 16, 2010 10:03 pm

Re: SD player UI development

Post by Fran »

Well, it says that the wifi card can output i2c signals and arduino can take them (I think). This would be no more than a single burst not a continuous stream I think? I dunno any more than that, but if the wifi card can output i2c then there must be output on one of the pins. Find pin and connect this to arduino?

I suppose where I think we need to get to (in the end - you're right John, first thing is to get it working):

App (preferably something that can be embedded in a browser) picks up file from library location. Sends to wifi card. Press play and command goes to wifi card which triggers i2c signal to arduino, arduino turns around the command and make SD player load and run the file.

But we'd need to know a few things. i2c to arduino, do we even need arduino or could we go straight from wifi card code to processor?

John - do you have to connect directly to the card, or will the card connect to your router?
Do or do not, there is no try
nige2000
Posts: 4253
Joined: Thu Feb 14, 2013 10:47 am
Location: meath

Re: SD player UI development

Post by nige2000 »

Fran wrote: Fri Apr 13, 2018 12:53 am Well, it says that the wifi card can output i2c signals and arduino can take them (I think). This would be no more than a single burst not a continuous stream I think? I dunno any more than that, but if the wifi card can output i2c then there must be output on one of the pins. Find pin and connect this to arduino?
u think theres an i2c pin on the sdcard?
I suppose where I think we need to get to (in the end - you're right John, first thing is to get it working):

App (preferably something that can be embedded in a browser) picks up file from library location. Sends to wifi card. Press play and command goes to wifi card which triggers i2c signal to arduino, arduino turns around the command and make SD player load and run the file.
dont sound like a bad idea

But we'd need to know a few things. i2c to arduino, do we even need arduino or could we go straight from wifi card code to processor?
to go straight to the arm processor wont we need the arm code?

John - do you have to connect directly to the card, or will the card connect to your router?
it can do both, i managed to figure that out before i broke my wifi card fumbling around with a mac, will have another on mon
sd card player, modded soekris dac, class a lifepo4 amp or gb class a/b amp, diy open baffle speakers based on project audio mundorf trio 10's
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: SD player UI development

Post by jkeny »

Fran wrote: Fri Apr 13, 2018 12:53 am Well, it says that the wifi card can output i2c signals and arduino can take them (I think). This would be no more than a single burst not a continuous stream I think? I dunno any more than that, but if the wifi card can output i2c then there must be output on one of the pins. Find pin and connect this to arduino?

I suppose where I think we need to get to (in the end - you're right John, first thing is to get it working):

App (preferably something that can be embedded in a browser) picks up file from library location. Sends to wifi card. Press play and command goes to wifi card which triggers i2c signal to arduino, arduino turns around the command and make SD player load and run the file.

But we'd need to know a few things. i2c to arduino, do we even need arduino or could we go straight from wifi card code to processor?

John - do you have to connect directly to the card, or will the card connect to your router?
Ah, I see that I2C is a new feature introduced in the version 4 of the Flashair cards.

So yes, in theory, the card could receive a key press code via WiFi & a Lua scrip communicate the code with the Arduino - but this is where I have doubts - we would need to send this code to the Arduino via WiFi? (don't think we can do it via one of the SD card tracks). Messing about with multiple WiFi connections & getting reliable working is not my idea of fun - more like hair pulling frustration. The Arduino would then need to electrically emulate a key press. Just seems like a lot of complexity for not much benefit when we already have IR comms setup & ready to use - just need IR transmission of the IR codes from the control device. I think the I2C stuff is mistaken as I can't see how or why we need it communicated to the Arduino?

Yes, Flashair can be connected directly via WiFi to the control device (but then the control device is no longer connected to WiFi router & internet) or it can be connected via the WiFi network to the control device which retains internat connection
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
nige2000
Posts: 4253
Joined: Thu Feb 14, 2013 10:47 am
Location: meath

Re: SD player UI development

Post by nige2000 »

sd card player, modded soekris dac, class a lifepo4 amp or gb class a/b amp, diy open baffle speakers based on project audio mundorf trio 10's
User avatar
Fran
Site Admin
Posts: 4160
Joined: Sat Jan 16, 2010 10:03 pm

Re: SD player UI development

Post by Fran »

So yes, in theory, the card could receive a key press code via WiFi & a Lua scrip communicate the code with the Arduino - but this is where I have doubts - we would need to send this code to the Arduino via WiFi? (don't think we can do it via one of the SD card tracks)
Yes - this was my initial thinking - that we could get it from the card. I agree that having the arduino on another wifi connection wouldn't work. My premise is this.... i2c is available from the SD card (as per their website). That means there must be some way of picking up that signal. If we can pick up that signal, we can use that to simulate a button press. Maybe this can be done via an arduino type device, or maybe we can do it directly. I'm not sure of any of this BTW - just throwing ideas out for now.

RE key presses - I'm assuming that when you press the physical key, it sets an analog input pin on the controller high or low. The arduino can do exactly the same thing on one of its digital output pins.

I need to think about this a bit more. I don't have a player yet, or a wifi SD card!!
Do or do not, there is no try
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: SD player UI development

Post by jkeny »

Very interesting!
We're down the rabbit hole of IoT development tools - that is certainly one aspect that will need to be address - how we do the comms between remote control device & SD card player

The other aspect that needs solving is - what is the best UI for the remote control device. I think these are the characteristics needed for this UI - feel free to add to this list?
  • a nice UI that displays all the albums in our music data store (on local or on LAN)
  • Work on all devices PC/tablet/phone
  • allows us to choose albums/tracks to put on the playlist
  • Is free & open source
  • allows us to tweak it (change the code?) so that we can do the following:
    • synchronise the playlist via wifi with the SD card i.e add/delete tracks on the SD card that are added/deleted on the control device playlist display
    • Send button commands to SD card player (my starting point is simply to use IR codes transmission to SD card player) when play/stop/next/back, etc functions are clicked on the control device display
AmplitudeJS satisfies almost all of these criteria but it doesn't yet have the display of & navigation through the full music library for selection of tracks to be included in the playlist - it seems to start just from the playlist. A simple solution is probably the hairshirt approach seen so often in this hobby - navigation of folders/files using explorer & drag & drop files into playlist. This would be OK for PC but other devices not so easy

So we probably need a good music library manager which allows us to navigate & select tracks from our music library for inclusion in playlist

The best approach to this is probably a separate music library manager app with a data bridge to the AmplitudeJs playlist? That way this music manager can do things like organising/managing, tagging, retrieve cover art, lyrics, etc & the AmplitudeJS is simply tasked with managing the playlist & data comms to SD card.

I did find a really good open source manager yesterday & left it open in a tab but Win did an update over night & all my tabs are closed - need to search my history - ah found it http://beets.io/
It seems to be just what we want "Beets is the media library management system for obsessive-compulsive music geeks." - that describes the TnaHF computer audio group well :)
It's an organiser that automatically fetches tags, cover art
  • Fetch or calculate all the metadata you could possibly need: album art, lyrics, genres, tempos, ReplayGain levels, or acoustic fingerprints.
  • Get metadata from MusicBrainz, Discogs, or Beatport. Or guess metadata using songs’ filenames or their acoustic fingerprints.
  • Transcode audio to any format you like.
  • Check your library for duplicate tracks and albums or for albums that are missing tracks.
  • Browse your music library graphically through a Web browser and play it in any browser that supports HTML5 Audio.


This might be all we need as plugins can be written for it to extend its functionality?
It seems to be a native Linux app & running on Windows might be cumbersome

Thoughts?
Last edited by jkeny on Fri Apr 13, 2018 1:27 pm, edited 1 time in total.
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: SD player UI development

Post by jkeny »

Fran wrote: Fri Apr 13, 2018 1:02 pm
So yes, in theory, the card could receive a key press code via WiFi & a Lua scrip communicate the code with the Arduino - but this is where I have doubts - we would need to send this code to the Arduino via WiFi? (don't think we can do it via one of the SD card tracks)
Yes - this was my initial thinking - that we could get it from the card. I agree that having the arduino on another wifi connection wouldn't work. My premise is this.... i2c is available from the SD card (as per their website). That means there must be some way of picking up that signal. If we can pick up that signal, we can use that to simulate a button press. Maybe this can be done via an arduino type device, or maybe we can do it directly. I'm not sure of any of this BTW - just throwing ideas out for now.

RE key presses - I'm assuming that when you press the physical key, it sets an analog input pin on the controller high or low. The arduino can do exactly the same thing on one of its digital output pins.

I need to think about this a bit more. I don't have a player yet, or a wifi SD card!!
Yea it's worthwhile throwing around ideas - that's what I hoped the thread would be used for but the difficulty as I see it, is that the SD player could be reading audio file data off the SD card during playback at the same time as a button push command comes through - we don't want to have to use this same data channel for handling button commands while playing. Best to use a separate channel which has no impact on the SD card reading.

When I first got the SD player I used an SD card I had lying around & the sound crackled & popped & was noisy. The problem was that the card was not HC class 6 or whatever the speed class needed - that's one reason I don't think this approach is a runner - I think we would be in unknown territory about timing issues & impact on sound.

I was also a bit concerned about the WiFi comms on the SD card before I got it - would the RF interfere with sound? - would WiFi data comms slow down the data reading of the ARM processor during playback? So far both of these fears have not been realised but I haven't tried a big data dump via WiFi yet to see if it affects playback. It may well do as one characteristic I noticed when I was copying a large amount of data (>1GB) to the SD card plugged into my PC was that it has excellent speed initially (>50MBps?) but then it gets into a pattern where it slows right down <1MBps & speeds back up again, repeating this pattern until finished data transfer. looks like there's some sort of buffer filling/emptying going on. This may have consequences via WiFi - I don't know?
Last edited by jkeny on Fri Apr 13, 2018 1:38 pm, edited 1 time in total.
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: SD player UI development

Post by jkeny »

If someone was willing to investigate Beets music library manager, that would be excellent - a bit of Github experience !!
I'm researching AmplitudeJS

Division of labour - collaborative group work & all that - we may be able to bring this thing together :)
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
randytsuch
Posts: 395
Joined: Mon Aug 11, 2014 4:19 am

Re: SD player UI development

Post by randytsuch »

My 2 cents :)

If this was a work project (I don't work on SW projects, but I somewhat understand their process, and we use the same basic processes for all development), then we would come up with the requirements first.
Requirements are always key to a project. And requirements creep is what kills schedules, and usually messes up programs. Add more stuff in the middle of a program, it can really screw up the program.
But in real life, people like to design and code before requirements are agreed to :)

I would also recommend making a list of requirements, versus a "wish list". So we have what we really need, and then the stuff that would be nice to have, that can be added later.

To me, some of John's list falls into the nice to have category, but maybe that's just me.

My goal would be the bare minimum to have a somewhat user friendly audio player. Keep the requirements list small, and somewhat manageable, don't bite off more than we can chew.

So here goes:
Requirements
1. Android and PC versions
2. IR interface from remote device to SDP to simulate the ir remote
3. Reads and display contents of a flashair 4 wifi SD card
3a. Display contents in different sort orders (by artist, song title, genre) (I'm iffy on this one, hence the 3a lol)
4. Allows user to choose a song, then generates IR codes to play that song.
5. Separate app to add/delete songs to SD card.
6. Open source. Note that we need to pay attention to the licenses of any code we copy from or use.

Goals (not in any particular order)
1. IOS version
2. WIFI interface from remote device to SDP
3. Integrated Music library manager, allowing user to delete/add songs to SD card
4. Resyncs SD card contents (associated with goal 3)
5. Supports playlists

What do you guys think?
If I'm way off base here, I'll go back to my corner :)

My android phone is rooted, so it may be easier to test with. I just recently rooted it, and just have a few apps that use root.

Randy
MSI H81-P33 MB, Xeon E3-1225 V3, LPS/LIFEPO4 and Astron RS-12A, 240gb SSD music, 2nd SSD for OS, Mod SS PCIE USB card, Server2012 R2 Ess+AO+MQn, Amanero USB to DACEND ES9018 to Schiit Lyr amp to Senn HD 700 headphones
jkeny
Posts: 2387
Joined: Sun Jan 17, 2010 9:37 pm

Re: SD player UI development

Post by jkeny »

I agree, Randy, scope creep is the bane of software projects

Yes, in general terms we two main functions
- easy to use way of adding/deleting files from SD card via WiFi
- easy to use way of sending play/stop/navigation events to SDP for actioning on SDP

What we have to work with:
- SDP with WiFi & infrared capabilities
- existing open source code & libraries

We will need to modify some software to achieve the two main functions above.
At the moment I consider that we are at the investigation stage into this open source code/libraries to see what functionality/modifiability they provide so we can choose the best fit to our needs.

Agree that the software licensing aspect needs to be paid attention to that why I specified open source - which ranges from restricted use to completely 'do what you want with it' use (Both AMplitudeJS & Beets are - MIT license - complete, unrestricted use). We also need to be able to modify this software because we want to send data files via WiFi & button commands via IR

if there are any better options, please post links? It may be that AmplitudeJS is not needed & everything can be done in Beets as it is extendible & written in Python (any Python experience here?). TBH, I would be happier with using just Beets alone but I don't think there is a strong GUI.

When I get AmplitudeJS working I will link to a download or if someone else gets there first please post - I've no problem anyone doing this :)

As I said if anyone would look into Beets, that would be great or have other suggestions?
www.Ciunas.biz
For Digital Audio playback that delivers WHERE the performers are on stage but more importantly WHY they are there.
Post Reply