Click here to Skip to main content
15,887,746 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
msk471115-Oct-18 22:50
msk471115-Oct-18 22:50 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus16-Oct-18 2:08
mvaraddevus16-Oct-18 2:08 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Bernhard Hiller16-Oct-18 22:52
Bernhard Hiller16-Oct-18 22:52 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Marc Clifton16-Oct-18 1:24
mvaMarc Clifton16-Oct-18 1:24 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus16-Oct-18 2:12
mvaraddevus16-Oct-18 2:12 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Storm-blade16-Oct-18 1:30
professionalStorm-blade16-Oct-18 1:30 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus16-Oct-18 2:13
mvaraddevus16-Oct-18 2:13 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Rick York16-Oct-18 5:32
mveRick York16-Oct-18 5:32 
FFT is a good technique to use but I am not sure how well it will work in this situation - using a Pi. You can probably get by with testing for fundamentals up to about 4K. The reasoning is the low E on a 4-string bass is ~40Hz, 80 for a guitar. Five octaves above that would be 2560Hz so, according to Mr. Nyquist, you need to sample at 5.1KHz minimum. Probably 6KHz or 8KHz would be better. If you do FFTs on 256 samples you would need to do 32 of them per second to keep up and that would mean bursts of data would come every 30mS. You will need to use the fastest Pi available to keep up with that. I might be thinking about this wrongly though.

There are a few free programs you can play around with to get an understanding of this. Here's one : Audio Spectrum Analyser[^] and here is another : Sound Frequency Analyzer[^]. I think there is source code for them available too.
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus16-Oct-18 8:35
mvaraddevus16-Oct-18 8:35 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Rick York16-Oct-18 9:38
mveRick York16-Oct-18 9:38 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
Jan Holst Jensen218-Oct-18 1:14
Jan Holst Jensen218-Oct-18 1:14 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
StatementTerminator18-Oct-18 4:19
StatementTerminator18-Oct-18 4:19 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus18-Oct-18 12:47
mvaraddevus18-Oct-18 12:47 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
StatementTerminator19-Oct-18 5:07
StatementTerminator19-Oct-18 5:07 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus19-Oct-18 8:35
mvaraddevus19-Oct-18 8:35 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
StatementTerminator19-Oct-18 8:38
StatementTerminator19-Oct-18 8:38 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus19-Oct-18 8:43
mvaraddevus19-Oct-18 8:43 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
englebart18-Oct-18 9:31
professionalenglebart18-Oct-18 9:31 
GeneralRe: friend: frequency to MIDI should be easy right? Pin
raddevus18-Oct-18 12:49
mvaraddevus18-Oct-18 12:49 
RantHideous Colors in Git Bash Shell Pin
David A. Gray3-Sep-18 20:52
David A. Gray3-Sep-18 20:52 
GeneralRe: Hideous Colors in Git Bash Shell Pin
Jörgen Andersson3-Sep-18 21:17
professionalJörgen Andersson3-Sep-18 21:17 
GeneralRe: Hideous Colors in Git Bash Shell Pin
David A. Gray4-Sep-18 6:41
David A. Gray4-Sep-18 6:41 
GeneralRe: Hideous Colors in Git Bash Shell Pin
Mycroft Holmes3-Oct-18 21:07
professionalMycroft Holmes3-Oct-18 21:07 
GeneralRe: Hideous Colors in Git Bash Shell Pin
den2k883-Sep-18 21:28
professionalden2k883-Sep-18 21:28 
GeneralRe: Hideous Colors in Git Bash Shell Pin
raddevus4-Sep-18 3:10
mvaraddevus4-Sep-18 3:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.