Closed likelian closed 2 years ago
Juce Tutorial 36- Opening Audio Files using the File Chooser Class https://www.youtube.com/watch?v=eB6S8iWvx2k
Tutorial: Build an audio player https://docs.juce.com/master/tutorial_playing_sound_files.html
Those seem to be involving building a streaming player of local audio files, a bit different from loading audio into a plugin.
Build a Sampler VST Plug-in with JUCE Part 1 - Loading and Playing https://www.youtube.com/watch?v=F-EkwKFftPY#action=share
Build a Sampler VST Plug-in with JUCE Part 1 - Loading and Playing https://www.youtube.com/watch?v=F-EkwKFftPY#action=share
Synthesiser Class - Base class for playing notes SampleSound Class - represents sampled audio clip SamplerVoice Class - “number of voices” the sampler can play
File Loading FileChooser Class -Loads browser dialog to choose file File Class - File
File -> playing audio
AudioFormatManager Class - registers basic audio formats AudioFormatReader Class - reads samples from audio stream
Build a Sampler VST Plug-in with JUCE Part 1 - Loading and Playing https://www.youtube.com/watch?v=F-EkwKFftPY#action=share
The provided method in the tutorial doesn't work (at least easily) with the current version. Instead, use the demo code in the documentation.
More about this issue https://forum.juce.com/t/solved-juce-filechooser-has-no-member-browseforfiletoopen/47793/5
prepareToPlay() called whenever block length is changed (at least in Logic Pro). We can Initial the audioBuffer inside prepareToPlay().
Is sampling rate conversion a concern?
able to select and load wav files now. Next: test on other formats, especially mp3.
registerFormat (new WavAudioFormat(), true);
registerFormat (new AiffAudioFormat(), false);
#if JUCE_USE_FLAC
registerFormat (new FlacAudioFormat(), false);
#endif
#if JUCE_USE_OGGVORBIS
registerFormat (new OggVorbisAudioFormat(), false);
#endif
#if JUCE_MAC || JUCE_IOS
registerFormat (new CoreAudioFormat(), false);
#endif
#if JUCE_USE_MP3AUDIOFORMAT
registerFormat (new MP3AudioFormat(), false);
#endif
#if JUCE_USE_WINDOWS_MEDIA_FORMAT
registerFormat (new WindowsMediaAudioFormat(), false);
#endif
wma doesn't load on Mac, but perhaps it will load on Windows
tested audio formats (just loading): .aac;;.aiff;;.flac;;.m4a;;.mp3;;.ogg;;*.wav;;
Click "more..." and a pop-up window let users to load an audio file.