├── .gitignore ├── FreesoundSimpleSampler.PNG ├── FreesoundSimpleSampler ├── Builds │ ├── MacOSX │ │ ├── FreesoundSimpleSampler.entitlements │ │ ├── FreesoundSimpleSampler.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ ├── xcshareddata │ │ │ │ │ └── WorkspaceSettings.xcsettings │ │ │ │ └── xcuserdata │ │ │ │ │ └── ffont.xcuserdatad │ │ │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── xcuserdata │ │ │ │ └── ffont.xcuserdatad │ │ │ │ └── xcschemes │ │ │ │ └── xcschememanagement.plist │ │ ├── Info-AU.plist │ │ ├── Info-Standalone_Plugin.plist │ │ ├── Info-VST3.plist │ │ └── RecentFilesMenuTemplate.nib │ └── VisualStudio2017 │ │ ├── FreesoundSimpleSampler.sln │ │ ├── FreesoundSimpleSampler_SharedCode.vcxproj │ │ ├── FreesoundSimpleSampler_SharedCode.vcxproj.filters │ │ ├── FreesoundSimpleSampler_SharedCode.vcxproj.user │ │ ├── FreesoundSimpleSampler_StandalonePlugin.vcxproj │ │ ├── FreesoundSimpleSampler_StandalonePlugin.vcxproj.filters │ │ ├── FreesoundSimpleSampler_StandalonePlugin.vcxproj.user │ │ ├── FreesoundSimpleSampler_VST.vcxproj │ │ ├── FreesoundSimpleSampler_VST.vcxproj.filters │ │ ├── FreesoundSimpleSampler_VST.vcxproj.user │ │ ├── FreesoundSimpleSampler_VST3.vcxproj │ │ ├── FreesoundSimpleSampler_VST3.vcxproj.filters │ │ ├── FreesoundSimpleSampler_VST3.vcxproj.user │ │ └── resources.rc ├── FreesoundSimpleSampler.jucer ├── JuceLibraryCode │ ├── AppConfig.h │ ├── JuceHeader.h │ ├── ReadMe.txt │ ├── include_juce_audio_basics.cpp │ ├── include_juce_audio_basics.mm │ ├── include_juce_audio_devices.cpp │ ├── include_juce_audio_devices.mm │ ├── include_juce_audio_formats.cpp │ ├── include_juce_audio_formats.mm │ ├── include_juce_audio_plugin_client_AAX.cpp │ ├── include_juce_audio_plugin_client_AAX.mm │ ├── include_juce_audio_plugin_client_AU.r │ ├── include_juce_audio_plugin_client_AU_1.mm │ ├── include_juce_audio_plugin_client_AU_2.mm │ ├── include_juce_audio_plugin_client_AUv3.mm │ ├── include_juce_audio_plugin_client_RTAS.r │ ├── include_juce_audio_plugin_client_RTAS_1.cpp │ ├── include_juce_audio_plugin_client_RTAS_2.cpp │ ├── include_juce_audio_plugin_client_RTAS_3.cpp │ ├── include_juce_audio_plugin_client_RTAS_4.cpp │ ├── include_juce_audio_plugin_client_RTAS_utils.cpp │ ├── include_juce_audio_plugin_client_RTAS_utils.mm │ ├── include_juce_audio_plugin_client_Standalone.cpp │ ├── include_juce_audio_plugin_client_Unity.cpp │ ├── include_juce_audio_plugin_client_VST2.cpp │ ├── include_juce_audio_plugin_client_VST3.cpp │ ├── include_juce_audio_plugin_client_VST_utils.mm │ ├── include_juce_audio_plugin_client_utils.cpp │ ├── include_juce_audio_processors.cpp │ ├── include_juce_audio_processors.mm │ ├── include_juce_audio_utils.cpp │ ├── include_juce_audio_utils.mm │ ├── include_juce_core.cpp │ ├── include_juce_core.mm │ ├── include_juce_cryptography.cpp │ ├── include_juce_cryptography.mm │ ├── include_juce_data_structures.cpp │ ├── include_juce_data_structures.mm │ ├── include_juce_events.cpp │ ├── include_juce_events.mm │ ├── include_juce_graphics.cpp │ ├── include_juce_graphics.mm │ ├── include_juce_gui_basics.cpp │ ├── include_juce_gui_basics.mm │ ├── include_juce_gui_extra.cpp │ ├── include_juce_gui_extra.mm │ ├── include_juce_opengl.cpp │ └── include_juce_opengl.mm ├── Source │ ├── FreesoundAPI.cpp │ ├── FreesoundAPI.h │ ├── FreesoundSearchComponent.h │ ├── PluginEditor.cpp │ ├── PluginEditor.h │ ├── PluginProcessor.cpp │ ├── PluginProcessor.h │ ├── api_key.example.h │ └── defines.h └── debug.filtergraph ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | api_key.h 3 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffont/FreesoundSimpleSampler/85ba43a8144161257e07b522a56ee639f91f2a41/FreesoundSimpleSampler.PNG -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/FreesoundSimpleSampler.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/FreesoundSimpleSampler.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/FreesoundSimpleSampler.xcodeproj/project.xcworkspace/xcuserdata/ffont.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffont/FreesoundSimpleSampler/85ba43a8144161257e07b522a56ee639f91f2a41/FreesoundSimpleSampler/Builds/MacOSX/FreesoundSimpleSampler.xcodeproj/project.xcworkspace/xcuserdata/ffont.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/FreesoundSimpleSampler.xcodeproj/xcuserdata/ffont.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | FreesoundSimpleSampler - AU.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | FreesoundSimpleSampler - All.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 2 16 | 17 | FreesoundSimpleSampler - Shared Code.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 4 21 | 22 | FreesoundSimpleSampler - Standalone Plugin.xcscheme_^#shared#^_ 23 | 24 | orderHint 25 | 3 26 | 27 | FreesoundSimpleSampler - VST3.xcscheme_^#shared#^_ 28 | 29 | orderHint 30 | 1 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/Info-AU.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleExecutable 7 | ${EXECUTABLE_NAME} 8 | CFBundleIconFile 9 | 10 | CFBundleIdentifier 11 | com.MusicTechnologyGroup.FreesoundSimpleSampler 12 | CFBundleName 13 | FreesoundSimpleSampler 14 | CFBundleDisplayName 15 | FreesoundSimpleSampler 16 | CFBundlePackageType 17 | BNDL 18 | CFBundleSignature 19 | ???? 20 | CFBundleShortVersionString 21 | 1.0.0 22 | CFBundleVersion 23 | 1.0.0 24 | NSHumanReadableCopyright 25 | 26 | NSHighResolutionCapable 27 | 28 | AudioComponents 29 | 30 | 31 | name 32 | Music Technology Group: FreesoundSimpleSampler 33 | description 34 | FreesoundSimpleSampler 35 | factoryFunction 36 | FreesoundSimpleSamplerAUFactory 37 | manufacturer 38 | MuTG 39 | type 40 | aumu 41 | subtype 42 | FSSS 43 | version 44 | 65536 45 | resourceUsage 46 | 47 | network.client 48 | 49 | temporary-exception.files.all.read-write 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/Info-Standalone_Plugin.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleExecutable 7 | ${EXECUTABLE_NAME} 8 | CFBundleIconFile 9 | 10 | CFBundleIdentifier 11 | com.MusicTechnologyGroup.FreesoundSimpleSampler 12 | CFBundleName 13 | FreesoundSimpleSampler 14 | CFBundleDisplayName 15 | FreesoundSimpleSampler 16 | CFBundlePackageType 17 | APPL 18 | CFBundleSignature 19 | ???? 20 | CFBundleShortVersionString 21 | 1.0.0 22 | CFBundleVersion 23 | 1.0.0 24 | NSHumanReadableCopyright 25 | 26 | NSHighResolutionCapable 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/Info-VST3.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | CFBundleExecutable 7 | ${EXECUTABLE_NAME} 8 | CFBundleIconFile 9 | 10 | CFBundleIdentifier 11 | com.MusicTechnologyGroup.FreesoundSimpleSampler 12 | CFBundleName 13 | FreesoundSimpleSampler 14 | CFBundleDisplayName 15 | FreesoundSimpleSampler 16 | CFBundlePackageType 17 | BNDL 18 | CFBundleSignature 19 | ???? 20 | CFBundleShortVersionString 21 | 1.0.0 22 | CFBundleVersion 23 | 1.0.0 24 | NSHumanReadableCopyright 25 | 26 | NSHighResolutionCapable 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/MacOSX/RecentFilesMenuTemplate.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ffont/FreesoundSimpleSampler/85ba43a8144161257e07b522a56ee639f91f2a41/FreesoundSimpleSampler/Builds/MacOSX/RecentFilesMenuTemplate.nib -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 11.00 2 | # Visual Studio 2017 3 | 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreesoundSimpleSampler - Standalone Plugin", "FreesoundSimpleSampler_StandalonePlugin.vcxproj", "{4201F495-D0AE-A42E-AE8D-CD0F478B506D}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} = {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreesoundSimpleSampler - VST", "FreesoundSimpleSampler_VST.vcxproj", "{80F6DE83-247E-A8D4-5F90-75B1A4A9B464}" 10 | ProjectSection(ProjectDependencies) = postProject 11 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} = {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} 12 | EndProjectSection 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreesoundSimpleSampler - VST3", "FreesoundSimpleSampler_VST3.vcxproj", "{F49FEFCF-E199-F85D-1593-B0FDABCAF057}" 15 | ProjectSection(ProjectDependencies) = postProject 16 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} = {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1} 17 | EndProjectSection 18 | EndProject 19 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreesoundSimpleSampler - Shared Code", "FreesoundSimpleSampler_SharedCode.vcxproj", "{B405FDB1-0C71-FF4F-74FE-62E3B170EAE1}" 20 | EndProject 21 | Global 22 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 23 | Debug|x64 = Debug|x64 24 | Release|x64 = Release|x64 25 | EndGlobalSection 26 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 27 | {80F6DE83-247E-A8D4-5F90-75B1A4A9B464}.Debug|x64.ActiveCfg = Debug|x64 28 | {80F6DE83-247E-A8D4-5F90-75B1A4A9B464}.Debug|x64.Build.0 = Debug|x64 29 | {80F6DE83-247E-A8D4-5F90-75B1A4A9B464}.Release|x64.ActiveCfg = Release|x64 30 | {80F6DE83-247E-A8D4-5F90-75B1A4A9B464}.Release|x64.Build.0 = Release|x64 31 | {F49FEFCF-E199-F85D-1593-B0FDABCAF057}.Debug|x64.ActiveCfg = Debug|x64 32 | {F49FEFCF-E199-F85D-1593-B0FDABCAF057}.Debug|x64.Build.0 = Debug|x64 33 | {F49FEFCF-E199-F85D-1593-B0FDABCAF057}.Release|x64.ActiveCfg = Release|x64 34 | {F49FEFCF-E199-F85D-1593-B0FDABCAF057}.Release|x64.Build.0 = Release|x64 35 | {4201F495-D0AE-A42E-AE8D-CD0F478B506D}.Debug|x64.ActiveCfg = Debug|x64 36 | {4201F495-D0AE-A42E-AE8D-CD0F478B506D}.Debug|x64.Build.0 = Debug|x64 37 | {4201F495-D0AE-A42E-AE8D-CD0F478B506D}.Release|x64.ActiveCfg = Release|x64 38 | {4201F495-D0AE-A42E-AE8D-CD0F478B506D}.Release|x64.Build.0 = Release|x64 39 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1}.Debug|x64.ActiveCfg = Debug|x64 40 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1}.Debug|x64.Build.0 = Debug|x64 41 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1}.Release|x64.ActiveCfg = Release|x64 42 | {B405FDB1-0C71-FF4F-74FE-62E3B170EAE1}.Release|x64.Build.0 = Release|x64 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_SharedCode.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_StandalonePlugin.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Debug 9 | x64 10 | 11 | 12 | Release 13 | x64 14 | 15 | 16 | 17 | {4201F495-D0AE-A42E-AE8D-CD0F478B506D} 18 | 19 | 20 | 22 | Application 23 | false 24 | false 25 | v141 26 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 27 | 28 | 30 | Application 31 | false 32 | true 33 | v141 34 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | <_ProjectFileVersion>10.0.30319.1 45 | .exe 46 | $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ 47 | $(Platform)\$(Configuration)\Standalone Plugin\ 48 | FreesoundSimpleSampler 49 | true 50 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 51 | $(SolutionDir)$(Platform)\$(Configuration)\Standalone Plugin\ 52 | $(Platform)\$(Configuration)\Standalone Plugin\ 53 | FreesoundSimpleSampler 54 | true 55 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 56 | 57 | 58 | 59 | _DEBUG;%(PreprocessorDefinitions) 60 | true 61 | true 62 | Win32 63 | 64 | 65 | 66 | Disabled 67 | ProgramDatabase 68 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 69 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 70 | MultiThreadedDebugDLL 71 | true 72 | 73 | $(IntDir)\ 74 | $(IntDir)\ 75 | $(IntDir)\ 76 | Level4 77 | true 78 | true 79 | stdcpp14 80 | 81 | 82 | _DEBUG;%(PreprocessorDefinitions) 83 | 84 | 85 | $(OutDir)\FreesoundSimpleSampler.exe 86 | true 87 | libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) 88 | true 89 | $(IntDir)\FreesoundSimpleSampler.pdb 90 | Windows 91 | true 92 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 93 | 94 | 95 | true 96 | $(IntDir)\FreesoundSimpleSampler.bsc 97 | 98 | 99 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 100 | 101 | 102 | 103 | 104 | NDEBUG;%(PreprocessorDefinitions) 105 | true 106 | true 107 | Win32 108 | 109 | 110 | 111 | Full 112 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 113 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=1;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 114 | MultiThreadedDLL 115 | true 116 | 117 | $(IntDir)\ 118 | $(IntDir)\ 119 | $(IntDir)\ 120 | Level4 121 | true 122 | true 123 | stdcpp14 124 | 125 | 126 | NDEBUG;%(PreprocessorDefinitions) 127 | 128 | 129 | $(OutDir)\FreesoundSimpleSampler.exe 130 | true 131 | %(IgnoreSpecificDefaultLibraries) 132 | false 133 | $(IntDir)\FreesoundSimpleSampler.pdb 134 | Windows 135 | true 136 | true 137 | true 138 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 139 | 140 | 141 | true 142 | $(IntDir)\FreesoundSimpleSampler.bsc 143 | 144 | 145 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_StandalonePlugin.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61} 7 | 8 | 9 | 10 | 11 | JUCE Library Code 12 | 13 | 14 | 15 | 16 | 17 | JUCE Library Code 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_StandalonePlugin.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Debug 9 | x64 10 | 11 | 12 | Release 13 | x64 14 | 15 | 16 | 17 | {80F6DE83-247E-A8D4-5F90-75B1A4A9B464} 18 | 19 | 20 | 22 | DynamicLibrary 23 | false 24 | false 25 | v141 26 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 27 | 28 | 30 | DynamicLibrary 31 | false 32 | true 33 | v141 34 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | <_ProjectFileVersion>10.0.30319.1 45 | .dll 46 | $(SolutionDir)$(Platform)\$(Configuration)\VST\ 47 | $(Platform)\$(Configuration)\VST\ 48 | FreesoundSimpleSampler 49 | true 50 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 51 | $(SolutionDir)$(Platform)\$(Configuration)\VST\ 52 | $(Platform)\$(Configuration)\VST\ 53 | FreesoundSimpleSampler 54 | true 55 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 56 | 57 | 58 | 59 | _DEBUG;%(PreprocessorDefinitions) 60 | true 61 | true 62 | Win32 63 | 64 | 65 | 66 | Disabled 67 | ProgramDatabase 68 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 69 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 70 | MultiThreadedDebugDLL 71 | true 72 | 73 | $(IntDir)\ 74 | $(IntDir)\ 75 | $(IntDir)\ 76 | Level4 77 | true 78 | true 79 | stdcpp14 80 | 81 | 82 | _DEBUG;%(PreprocessorDefinitions) 83 | 84 | 85 | $(OutDir)\FreesoundSimpleSampler.dll 86 | true 87 | libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) 88 | true 89 | $(IntDir)\FreesoundSimpleSampler.pdb 90 | Windows 91 | true 92 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 93 | 94 | 95 | true 96 | $(IntDir)\FreesoundSimpleSampler.bsc 97 | 98 | 99 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 100 | 101 | 102 | 103 | 104 | NDEBUG;%(PreprocessorDefinitions) 105 | true 106 | true 107 | Win32 108 | 109 | 110 | 111 | Full 112 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 113 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=1;JucePlugin_Build_VST3=0;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 114 | MultiThreadedDLL 115 | true 116 | 117 | $(IntDir)\ 118 | $(IntDir)\ 119 | $(IntDir)\ 120 | Level4 121 | true 122 | true 123 | stdcpp14 124 | 125 | 126 | NDEBUG;%(PreprocessorDefinitions) 127 | 128 | 129 | $(OutDir)\FreesoundSimpleSampler.dll 130 | true 131 | %(IgnoreSpecificDefaultLibraries) 132 | false 133 | $(IntDir)\FreesoundSimpleSampler.pdb 134 | Windows 135 | true 136 | true 137 | true 138 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 139 | 140 | 141 | true 142 | $(IntDir)\FreesoundSimpleSampler.bsc 143 | 144 | 145 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61} 7 | 8 | 9 | 10 | 11 | JUCE Library Code 12 | 13 | 14 | 15 | 16 | 17 | JUCE Library Code 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST3.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Debug 9 | x64 10 | 11 | 12 | Release 13 | x64 14 | 15 | 16 | 17 | {F49FEFCF-E199-F85D-1593-B0FDABCAF057} 18 | 19 | 20 | 22 | DynamicLibrary 23 | false 24 | false 25 | v141 26 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 27 | 28 | 30 | DynamicLibrary 31 | false 32 | true 33 | v141 34 | $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | <_ProjectFileVersion>10.0.30319.1 45 | .vst3 46 | $(SolutionDir)$(Platform)\$(Configuration)\VST3\ 47 | $(Platform)\$(Configuration)\VST3\ 48 | FreesoundSimpleSampler 49 | true 50 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 51 | $(SolutionDir)$(Platform)\$(Configuration)\VST3\ 52 | $(Platform)\$(Configuration)\VST3\ 53 | FreesoundSimpleSampler 54 | true 55 | $(LibraryPath);$(SolutionDir)$(Platform)\$(Configuration)\Shared Code 56 | 57 | 58 | 59 | _DEBUG;%(PreprocessorDefinitions) 60 | true 61 | true 62 | Win32 63 | 64 | 65 | 66 | Disabled 67 | ProgramDatabase 68 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 69 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 70 | MultiThreadedDebugDLL 71 | true 72 | 73 | $(IntDir)\ 74 | $(IntDir)\ 75 | $(IntDir)\ 76 | Level4 77 | true 78 | true 79 | stdcpp14 80 | 81 | 82 | _DEBUG;%(PreprocessorDefinitions) 83 | 84 | 85 | $(OutDir)\FreesoundSimpleSampler.vst3 86 | true 87 | libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries) 88 | true 89 | $(IntDir)\FreesoundSimpleSampler.pdb 90 | Windows 91 | true 92 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 93 | 94 | 95 | true 96 | $(IntDir)\FreesoundSimpleSampler.bsc 97 | 98 | 99 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 100 | 101 | 102 | 103 | 104 | NDEBUG;%(PreprocessorDefinitions) 105 | true 106 | true 107 | Win32 108 | 109 | 110 | 111 | Full 112 | F:\Code\Libs\JUCE\modules\juce_audio_processors\format_types\VST3_SDK;F:\Code\Libs\vstsdk369_01_03_2018_build_132\VST_SDK\VST2_SDK;..\..\JuceLibraryCode;F:\Code\Libs\JUCE\modules;%(AdditionalIncludeDirectories) 113 | _CRT_SECURE_NO_WARNINGS;WIN32;_WINDOWS;NDEBUG;JUCER_VS2017_78A5024=1;JUCE_APP_VERSION=1.0.0;JUCE_APP_VERSION_HEX=0x10000;JucePlugin_Build_VST=0;JucePlugin_Build_VST3=1;JucePlugin_Build_AU=0;JucePlugin_Build_AUv3=0;JucePlugin_Build_RTAS=0;JucePlugin_Build_AAX=0;JucePlugin_Build_Standalone=0;JucePlugin_Build_Unity=0;%(PreprocessorDefinitions) 114 | MultiThreadedDLL 115 | true 116 | 117 | $(IntDir)\ 118 | $(IntDir)\ 119 | $(IntDir)\ 120 | Level4 121 | true 122 | true 123 | stdcpp14 124 | 125 | 126 | NDEBUG;%(PreprocessorDefinitions) 127 | 128 | 129 | $(OutDir)\FreesoundSimpleSampler.vst3 130 | true 131 | %(IgnoreSpecificDefaultLibraries) 132 | false 133 | $(IntDir)\FreesoundSimpleSampler.pdb 134 | Windows 135 | true 136 | true 137 | true 138 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 139 | 140 | 141 | true 142 | $(IntDir)\FreesoundSimpleSampler.bsc 143 | 144 | 145 | FreesoundSimpleSampler.lib;%(AdditionalDependencies) 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST3.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {7ED5A90E-41AF-A1EF-659B-37CEEAB9BA61} 7 | 8 | 9 | 10 | 11 | JUCE Library Code 12 | 13 | 14 | 15 | 16 | 17 | JUCE Library Code 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/FreesoundSimpleSampler_VST3.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | F:\Code\Libs\JUCE\extras\AudioPluginHost\Builds\VisualStudio2017\x64\Debug\App\AudioPluginHost.exe 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Builds/VisualStudio2017/resources.rc: -------------------------------------------------------------------------------- 1 | #ifdef JUCE_USER_DEFINED_RC_FILE 2 | #include JUCE_USER_DEFINED_RC_FILE 3 | #else 4 | 5 | #undef WIN32_LEAN_AND_MEAN 6 | #define WIN32_LEAN_AND_MEAN 7 | #include 8 | 9 | VS_VERSION_INFO VERSIONINFO 10 | FILEVERSION 1,0,0,0 11 | BEGIN 12 | BLOCK "StringFileInfo" 13 | BEGIN 14 | BLOCK "040904E4" 15 | BEGIN 16 | VALUE "CompanyName", "Music Technology Group\0" 17 | VALUE "FileDescription", "FreesoundSimpleSampler\0" 18 | VALUE "FileVersion", "1.0.0\0" 19 | VALUE "ProductName", "FreesoundSimpleSampler\0" 20 | VALUE "ProductVersion", "1.0.0\0" 21 | END 22 | END 23 | 24 | BLOCK "VarFileInfo" 25 | BEGIN 26 | VALUE "Translation", 0x409, 1252 27 | END 28 | END 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/FreesoundSimpleSampler.jucer: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 18 | 20 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/AppConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | There's a section below where you can add your own custom code safely, and the 7 | Projucer will preserve the contents of that block, but the best way to change 8 | any of these definitions is by using the Projucer's project settings. 9 | 10 | Any commented-out settings will assume their default values. 11 | 12 | */ 13 | 14 | #pragma once 15 | 16 | //============================================================================== 17 | // [BEGIN_USER_CODE_SECTION] 18 | 19 | // (You can add your own code in this section, and the Projucer will not overwrite it) 20 | 21 | // [END_USER_CODE_SECTION] 22 | 23 | /* 24 | ============================================================================== 25 | 26 | In accordance with the terms of the JUCE 5 End-Use License Agreement, the 27 | JUCE Code in SECTION A cannot be removed, changed or otherwise rendered 28 | ineffective unless you have a JUCE Indie or Pro license, or are using JUCE 29 | under the GPL v3 license. 30 | 31 | End User License Agreement: www.juce.com/juce-5-licence 32 | 33 | ============================================================================== 34 | */ 35 | 36 | // BEGIN SECTION A 37 | 38 | #ifndef JUCE_DISPLAY_SPLASH_SCREEN 39 | #define JUCE_DISPLAY_SPLASH_SCREEN 0 40 | #endif 41 | 42 | #ifndef JUCE_REPORT_APP_USAGE 43 | #define JUCE_REPORT_APP_USAGE 0 44 | #endif 45 | 46 | // END SECTION A 47 | 48 | #define JUCE_USE_DARK_SPLASH_SCREEN 1 49 | 50 | //============================================================================== 51 | #define JUCE_MODULE_AVAILABLE_juce_audio_basics 1 52 | #define JUCE_MODULE_AVAILABLE_juce_audio_devices 1 53 | #define JUCE_MODULE_AVAILABLE_juce_audio_formats 1 54 | #define JUCE_MODULE_AVAILABLE_juce_audio_plugin_client 1 55 | #define JUCE_MODULE_AVAILABLE_juce_audio_processors 1 56 | #define JUCE_MODULE_AVAILABLE_juce_audio_utils 1 57 | #define JUCE_MODULE_AVAILABLE_juce_core 1 58 | #define JUCE_MODULE_AVAILABLE_juce_cryptography 1 59 | #define JUCE_MODULE_AVAILABLE_juce_data_structures 1 60 | #define JUCE_MODULE_AVAILABLE_juce_events 1 61 | #define JUCE_MODULE_AVAILABLE_juce_graphics 1 62 | #define JUCE_MODULE_AVAILABLE_juce_gui_basics 1 63 | #define JUCE_MODULE_AVAILABLE_juce_gui_extra 1 64 | #define JUCE_MODULE_AVAILABLE_juce_opengl 1 65 | 66 | #define JUCE_GLOBAL_MODULE_SETTINGS_INCLUDED 1 67 | 68 | //============================================================================== 69 | // juce_audio_devices flags: 70 | 71 | #ifndef JUCE_USE_WINRT_MIDI 72 | //#define JUCE_USE_WINRT_MIDI 0 73 | #endif 74 | 75 | #ifndef JUCE_ASIO 76 | //#define JUCE_ASIO 0 77 | #endif 78 | 79 | #ifndef JUCE_WASAPI 80 | //#define JUCE_WASAPI 1 81 | #endif 82 | 83 | #ifndef JUCE_WASAPI_EXCLUSIVE 84 | //#define JUCE_WASAPI_EXCLUSIVE 0 85 | #endif 86 | 87 | #ifndef JUCE_DIRECTSOUND 88 | //#define JUCE_DIRECTSOUND 1 89 | #endif 90 | 91 | #ifndef JUCE_ALSA 92 | //#define JUCE_ALSA 1 93 | #endif 94 | 95 | #ifndef JUCE_JACK 96 | //#define JUCE_JACK 0 97 | #endif 98 | 99 | #ifndef JUCE_BELA 100 | //#define JUCE_BELA 0 101 | #endif 102 | 103 | #ifndef JUCE_USE_ANDROID_OBOE 104 | //#define JUCE_USE_ANDROID_OBOE 0 105 | #endif 106 | 107 | #ifndef JUCE_USE_ANDROID_OPENSLES 108 | //#define JUCE_USE_ANDROID_OPENSLES 0 109 | #endif 110 | 111 | #ifndef JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 112 | //#define JUCE_DISABLE_AUDIO_MIXING_WITH_OTHER_APPS 0 113 | #endif 114 | 115 | //============================================================================== 116 | // juce_audio_formats flags: 117 | 118 | #ifndef JUCE_USE_FLAC 119 | //#define JUCE_USE_FLAC 1 120 | #endif 121 | 122 | #ifndef JUCE_USE_OGGVORBIS 123 | //#define JUCE_USE_OGGVORBIS 1 124 | #endif 125 | 126 | #ifndef JUCE_USE_MP3AUDIOFORMAT 127 | //#define JUCE_USE_MP3AUDIOFORMAT 0 128 | #endif 129 | 130 | #ifndef JUCE_USE_LAME_AUDIO_FORMAT 131 | //#define JUCE_USE_LAME_AUDIO_FORMAT 0 132 | #endif 133 | 134 | #ifndef JUCE_USE_WINDOWS_MEDIA_FORMAT 135 | //#define JUCE_USE_WINDOWS_MEDIA_FORMAT 1 136 | #endif 137 | 138 | //============================================================================== 139 | // juce_audio_plugin_client flags: 140 | 141 | #ifndef JUCE_VST3_CAN_REPLACE_VST2 142 | #define JUCE_VST3_CAN_REPLACE_VST2 0 143 | #endif 144 | 145 | #ifndef JUCE_FORCE_USE_LEGACY_PARAM_IDS 146 | //#define JUCE_FORCE_USE_LEGACY_PARAM_IDS 0 147 | #endif 148 | 149 | #ifndef JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE 150 | //#define JUCE_FORCE_LEGACY_PARAMETER_AUTOMATION_TYPE 0 151 | #endif 152 | 153 | #ifndef JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 154 | //#define JUCE_USE_STUDIO_ONE_COMPATIBLE_PARAMETERS 1 155 | #endif 156 | 157 | #ifndef JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE 158 | //#define JUCE_STANDALONE_FILTER_WINDOW_USE_KIOSK_MODE 0 159 | #endif 160 | 161 | //============================================================================== 162 | // juce_audio_processors flags: 163 | 164 | #ifndef JUCE_PLUGINHOST_VST 165 | //#define JUCE_PLUGINHOST_VST 0 166 | #endif 167 | 168 | #ifndef JUCE_PLUGINHOST_VST3 169 | //#define JUCE_PLUGINHOST_VST3 0 170 | #endif 171 | 172 | #ifndef JUCE_PLUGINHOST_AU 173 | //#define JUCE_PLUGINHOST_AU 0 174 | #endif 175 | 176 | #ifndef JUCE_PLUGINHOST_LADSPA 177 | //#define JUCE_PLUGINHOST_LADSPA 0 178 | #endif 179 | 180 | //============================================================================== 181 | // juce_audio_utils flags: 182 | 183 | #ifndef JUCE_USE_CDREADER 184 | //#define JUCE_USE_CDREADER 0 185 | #endif 186 | 187 | #ifndef JUCE_USE_CDBURNER 188 | //#define JUCE_USE_CDBURNER 0 189 | #endif 190 | 191 | //============================================================================== 192 | // juce_core flags: 193 | 194 | #ifndef JUCE_FORCE_DEBUG 195 | //#define JUCE_FORCE_DEBUG 0 196 | #endif 197 | 198 | #ifndef JUCE_LOG_ASSERTIONS 199 | //#define JUCE_LOG_ASSERTIONS 0 200 | #endif 201 | 202 | #ifndef JUCE_CHECK_MEMORY_LEAKS 203 | //#define JUCE_CHECK_MEMORY_LEAKS 1 204 | #endif 205 | 206 | #ifndef JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 207 | //#define JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES 0 208 | #endif 209 | 210 | #ifndef JUCE_INCLUDE_ZLIB_CODE 211 | //#define JUCE_INCLUDE_ZLIB_CODE 1 212 | #endif 213 | 214 | #ifndef JUCE_USE_CURL 215 | //#define JUCE_USE_CURL 1 216 | #endif 217 | 218 | #ifndef JUCE_LOAD_CURL_SYMBOLS_LAZILY 219 | //#define JUCE_LOAD_CURL_SYMBOLS_LAZILY 0 220 | #endif 221 | 222 | #ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS 223 | //#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 0 224 | #endif 225 | 226 | #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES 227 | //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 228 | #endif 229 | 230 | #ifndef JUCE_STRICT_REFCOUNTEDPOINTER 231 | #define JUCE_STRICT_REFCOUNTEDPOINTER 1 232 | #endif 233 | 234 | //============================================================================== 235 | // juce_events flags: 236 | 237 | #ifndef JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 238 | //#define JUCE_EXECUTE_APP_SUSPEND_ON_IOS_BACKGROUND_TASK 0 239 | #endif 240 | 241 | //============================================================================== 242 | // juce_graphics flags: 243 | 244 | #ifndef JUCE_USE_COREIMAGE_LOADER 245 | //#define JUCE_USE_COREIMAGE_LOADER 1 246 | #endif 247 | 248 | #ifndef JUCE_USE_DIRECTWRITE 249 | //#define JUCE_USE_DIRECTWRITE 1 250 | #endif 251 | 252 | #ifndef JUCE_DISABLE_COREGRAPHICS_FONT_SMOOTHING 253 | //#define JUCE_DISABLE_COREGRAPHICS_FONT_SMOOTHING 0 254 | #endif 255 | 256 | //============================================================================== 257 | // juce_gui_basics flags: 258 | 259 | #ifndef JUCE_ENABLE_REPAINT_DEBUGGING 260 | //#define JUCE_ENABLE_REPAINT_DEBUGGING 0 261 | #endif 262 | 263 | #ifndef JUCE_USE_XRANDR 264 | //#define JUCE_USE_XRANDR 1 265 | #endif 266 | 267 | #ifndef JUCE_USE_XINERAMA 268 | //#define JUCE_USE_XINERAMA 1 269 | #endif 270 | 271 | #ifndef JUCE_USE_XSHM 272 | //#define JUCE_USE_XSHM 1 273 | #endif 274 | 275 | #ifndef JUCE_USE_XRENDER 276 | //#define JUCE_USE_XRENDER 0 277 | #endif 278 | 279 | #ifndef JUCE_USE_XCURSOR 280 | //#define JUCE_USE_XCURSOR 1 281 | #endif 282 | 283 | #ifndef JUCE_WIN_PER_MONITOR_DPI_AWARE 284 | //#define JUCE_WIN_PER_MONITOR_DPI_AWARE 1 285 | #endif 286 | 287 | //============================================================================== 288 | // juce_gui_extra flags: 289 | 290 | #ifndef JUCE_WEB_BROWSER 291 | //#define JUCE_WEB_BROWSER 1 292 | #endif 293 | 294 | #ifndef JUCE_ENABLE_LIVE_CONSTANT_EDITOR 295 | //#define JUCE_ENABLE_LIVE_CONSTANT_EDITOR 0 296 | #endif 297 | 298 | //============================================================================== 299 | // Audio plugin settings.. 300 | 301 | #ifndef JucePlugin_Build_VST 302 | #define JucePlugin_Build_VST 0 303 | #endif 304 | #ifndef JucePlugin_Build_VST3 305 | #define JucePlugin_Build_VST3 1 306 | #endif 307 | #ifndef JucePlugin_Build_AU 308 | #define JucePlugin_Build_AU 1 309 | #endif 310 | #ifndef JucePlugin_Build_AUv3 311 | #define JucePlugin_Build_AUv3 0 312 | #endif 313 | #ifndef JucePlugin_Build_RTAS 314 | #define JucePlugin_Build_RTAS 0 315 | #endif 316 | #ifndef JucePlugin_Build_AAX 317 | #define JucePlugin_Build_AAX 0 318 | #endif 319 | #ifndef JucePlugin_Build_Standalone 320 | #define JucePlugin_Build_Standalone 1 321 | #endif 322 | #ifndef JucePlugin_Build_Unity 323 | #define JucePlugin_Build_Unity 0 324 | #endif 325 | #ifndef JucePlugin_Enable_IAA 326 | #define JucePlugin_Enable_IAA 0 327 | #endif 328 | #ifndef JucePlugin_Name 329 | #define JucePlugin_Name "FreesoundSimpleSampler" 330 | #endif 331 | #ifndef JucePlugin_Desc 332 | #define JucePlugin_Desc "FreesoundSimpleSampler" 333 | #endif 334 | #ifndef JucePlugin_Manufacturer 335 | #define JucePlugin_Manufacturer "Music Technology Group" 336 | #endif 337 | #ifndef JucePlugin_ManufacturerWebsite 338 | #define JucePlugin_ManufacturerWebsite "https://mtg.upf.edu" 339 | #endif 340 | #ifndef JucePlugin_ManufacturerEmail 341 | #define JucePlugin_ManufacturerEmail "" 342 | #endif 343 | #ifndef JucePlugin_ManufacturerCode 344 | #define JucePlugin_ManufacturerCode 0x4d755447 // 'MuTG' 345 | #endif 346 | #ifndef JucePlugin_PluginCode 347 | #define JucePlugin_PluginCode 0x46535353 // 'FSSS' 348 | #endif 349 | #ifndef JucePlugin_IsSynth 350 | #define JucePlugin_IsSynth 1 351 | #endif 352 | #ifndef JucePlugin_WantsMidiInput 353 | #define JucePlugin_WantsMidiInput 1 354 | #endif 355 | #ifndef JucePlugin_ProducesMidiOutput 356 | #define JucePlugin_ProducesMidiOutput 0 357 | #endif 358 | #ifndef JucePlugin_IsMidiEffect 359 | #define JucePlugin_IsMidiEffect 0 360 | #endif 361 | #ifndef JucePlugin_EditorRequiresKeyboardFocus 362 | #define JucePlugin_EditorRequiresKeyboardFocus 0 363 | #endif 364 | #ifndef JucePlugin_Version 365 | #define JucePlugin_Version 1.0.0 366 | #endif 367 | #ifndef JucePlugin_VersionCode 368 | #define JucePlugin_VersionCode 0x10000 369 | #endif 370 | #ifndef JucePlugin_VersionString 371 | #define JucePlugin_VersionString "1.0.0" 372 | #endif 373 | #ifndef JucePlugin_VSTUniqueID 374 | #define JucePlugin_VSTUniqueID JucePlugin_PluginCode 375 | #endif 376 | #ifndef JucePlugin_VSTCategory 377 | #define JucePlugin_VSTCategory kPlugCategSynth 378 | #endif 379 | #ifndef JucePlugin_Vst3Category 380 | #define JucePlugin_Vst3Category "Instrument|Sampler" 381 | #endif 382 | #ifndef JucePlugin_AUMainType 383 | #define JucePlugin_AUMainType 'aumu' 384 | #endif 385 | #ifndef JucePlugin_AUSubType 386 | #define JucePlugin_AUSubType JucePlugin_PluginCode 387 | #endif 388 | #ifndef JucePlugin_AUExportPrefix 389 | #define JucePlugin_AUExportPrefix FreesoundSimpleSamplerAU 390 | #endif 391 | #ifndef JucePlugin_AUExportPrefixQuoted 392 | #define JucePlugin_AUExportPrefixQuoted "FreesoundSimpleSamplerAU" 393 | #endif 394 | #ifndef JucePlugin_AUManufacturerCode 395 | #define JucePlugin_AUManufacturerCode JucePlugin_ManufacturerCode 396 | #endif 397 | #ifndef JucePlugin_CFBundleIdentifier 398 | #define JucePlugin_CFBundleIdentifier com.MusicTechnologyGroup.FreesoundSimpleSampler 399 | #endif 400 | #ifndef JucePlugin_RTASCategory 401 | #define JucePlugin_RTASCategory 2048 402 | #endif 403 | #ifndef JucePlugin_RTASManufacturerCode 404 | #define JucePlugin_RTASManufacturerCode JucePlugin_ManufacturerCode 405 | #endif 406 | #ifndef JucePlugin_RTASProductId 407 | #define JucePlugin_RTASProductId JucePlugin_PluginCode 408 | #endif 409 | #ifndef JucePlugin_RTASDisableBypass 410 | #define JucePlugin_RTASDisableBypass 0 411 | #endif 412 | #ifndef JucePlugin_RTASDisableMultiMono 413 | #define JucePlugin_RTASDisableMultiMono 0 414 | #endif 415 | #ifndef JucePlugin_AAXIdentifier 416 | #define JucePlugin_AAXIdentifier com.MusicTechnologyGroup.FreesoundSimpleSampler 417 | #endif 418 | #ifndef JucePlugin_AAXManufacturerCode 419 | #define JucePlugin_AAXManufacturerCode JucePlugin_ManufacturerCode 420 | #endif 421 | #ifndef JucePlugin_AAXProductId 422 | #define JucePlugin_AAXProductId JucePlugin_PluginCode 423 | #endif 424 | #ifndef JucePlugin_AAXCategory 425 | #define JucePlugin_AAXCategory 2048 426 | #endif 427 | #ifndef JucePlugin_AAXDisableBypass 428 | #define JucePlugin_AAXDisableBypass 0 429 | #endif 430 | #ifndef JucePlugin_AAXDisableMultiMono 431 | #define JucePlugin_AAXDisableMultiMono 0 432 | #endif 433 | #ifndef JucePlugin_IAAType 434 | #define JucePlugin_IAAType 0x61757269 // 'auri' 435 | #endif 436 | #ifndef JucePlugin_IAASubType 437 | #define JucePlugin_IAASubType JucePlugin_PluginCode 438 | #endif 439 | #ifndef JucePlugin_IAAName 440 | #define JucePlugin_IAAName "Music Technology Group: FreesoundSimpleSampler" 441 | #endif 442 | #ifndef JucePlugin_VSTNumMidiInputs 443 | #define JucePlugin_VSTNumMidiInputs 16 444 | #endif 445 | #ifndef JucePlugin_VSTNumMidiOutputs 446 | #define JucePlugin_VSTNumMidiOutputs 16 447 | #endif 448 | 449 | //============================================================================== 450 | #ifndef JUCE_STANDALONE_APPLICATION 451 | #if defined(JucePlugin_Name) && defined(JucePlugin_Build_Standalone) 452 | #define JUCE_STANDALONE_APPLICATION JucePlugin_Build_Standalone 453 | #else 454 | #define JUCE_STANDALONE_APPLICATION 0 455 | #endif 456 | #endif 457 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/JuceHeader.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | This is the header file that your files should include in order to get all the 7 | JUCE library headers. You should avoid including the JUCE headers directly in 8 | your own source files, because that wouldn't pick up the correct configuration 9 | options for your app. 10 | 11 | */ 12 | 13 | #pragma once 14 | 15 | #include "AppConfig.h" 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | #if ! DONT_SET_USING_JUCE_NAMESPACE 34 | // If your code uses a lot of JUCE classes, then this will obviously save you 35 | // a lot of typing, but can be disabled by setting DONT_SET_USING_JUCE_NAMESPACE. 36 | using namespace juce; 37 | #endif 38 | 39 | #if ! JUCE_DONT_DECLARE_PROJECTINFO 40 | namespace ProjectInfo 41 | { 42 | const char* const projectName = "FreesoundSimpleSampler"; 43 | const char* const companyName = "Music Technology Group"; 44 | const char* const versionString = "1.0.0"; 45 | const int versionNumber = 0x10000; 46 | } 47 | #endif 48 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/ReadMe.txt: -------------------------------------------------------------------------------- 1 | 2 | Important Note!! 3 | ================ 4 | 5 | The purpose of this folder is to contain files that are auto-generated by the Projucer, 6 | and ALL files in this folder will be mercilessly DELETED and completely re-written whenever 7 | the Projucer saves your project. 8 | 9 | Therefore, it's a bad idea to make any manual changes to the files in here, or to 10 | put any of your own files in here if you don't want to lose them. (Of course you may choose 11 | to add the folder's contents to your version-control system so that you can re-merge your own 12 | modifications after the Projucer has saved its changes). 13 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_basics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_basics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_devices.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_devices.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_formats.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_formats.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AAX.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AAX.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AU.r: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AU_1.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AU_2.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_AUv3.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS.r: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_1.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_4.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_RTAS_utils.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_Standalone.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_Unity.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_VST2.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_VST3.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_VST_utils.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_plugin_client_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_processors.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_processors.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_utils.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_audio_utils.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_core.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_core.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_cryptography.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_cryptography.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_data_structures.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_data_structures.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_events.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_events.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_graphics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_graphics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_gui_basics.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_gui_basics.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_gui_extra.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_gui_extra.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_opengl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/JuceLibraryCode/include_juce_opengl.mm: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | IMPORTANT! This file is auto-generated each time you save your 4 | project - if you alter its contents, your changes may be overwritten! 5 | 6 | */ 7 | 8 | #include "AppConfig.h" 9 | #include 10 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/FreesoundAPI.cpp: -------------------------------------------------------------------------------- 1 | #include "FreesoundAPI.h" 2 | 3 | String URIS::HOST = String("www.freesound.org"); 4 | String URIS::BASE = String("https://" + HOST + "/apiv2"); 5 | String URIS::TEXT_SEARCH = String("/search/text/"); 6 | String URIS::CONTENT_SEARCH = String("/search/content/"); 7 | String URIS::COMBINED_SEARCH = String("/search/combined/"); 8 | String URIS::SOUND = String("/sounds//"); 9 | String URIS::SOUND_ANALYSIS = String("/sounds//analysis/"); 10 | String URIS::SIMILAR_SOUNDS = String("/sounds//similar/"); 11 | String URIS::COMMENTS = String("/sounds//comments/"); 12 | String URIS::DOWNLOAD = String("/sounds//download/"); 13 | String URIS::UPLOAD = String("/sounds/upload/"); 14 | String URIS::DESCRIBE = String("/sounds//describe/"); 15 | String URIS::EDIT = String("/sounds//edit/"); 16 | String URIS::PENDING = String("/sounds/pending_uploads/"); 17 | String URIS::BOOKMARK = String("/sounds//bookmark/"); 18 | String URIS::RATE = String("/sounds//rate/"); 19 | String URIS::COMMENT = String("/sounds//comment/"); 20 | String URIS::AUTHORIZE = String("/oauth2/authorize/"); 21 | String URIS::LOGOUT = String("/api-auth/logout/"); 22 | String URIS::LOGOUT_AUTHORIZE = String("/oauth2/logout_and_authorize/"); 23 | String URIS::ACCESS_TOKEN = String("/oauth2/access_token/"); 24 | String URIS::ME = String("/me/"); 25 | String URIS::USER = String("/users//"); 26 | String URIS::USER_SOUNDS = String("/users//sounds/"); 27 | String URIS::USER_PACKS = String("/users//packs/"); 28 | String URIS::USER_BOOKMARK_CATEGORIES = String("/users//bookmark_categories/"); 29 | String URIS::USER_BOOKMARK_CATEGORY_SOUNDS = String("/users//bookmark_categories//sounds/"); 30 | String URIS::PACK = String("/packs//"); 31 | String URIS::PACK_SOUNDS = String("/packs//sounds/"); 32 | String URIS::PACK_DOWNLOAD = String("/packs//download/"); 33 | String URIS::CONFIRMATION = String("https://" + HOST + "/home/app_permissions/permission_granted/"); 34 | 35 | URL URIS::uri(String uri, StringArray replacements) 36 | { 37 | if (!replacements.isEmpty()) { 38 | for (int i = 0; i < replacements.size(); i++) { 39 | int start = uri.indexOfChar('<'); 40 | int end = uri.indexOfChar('>'); 41 | uri = uri.replaceSection(start, 1 + end - start, replacements[i]); 42 | } 43 | } 44 | return BASE + uri; 45 | } 46 | 47 | FreesoundClient::FreesoundClient() 48 | { 49 | token = String(); 50 | clientID = String(); 51 | clientSecret = String(); 52 | header = String(); 53 | auth = None; 54 | } 55 | 56 | FreesoundClient::FreesoundClient(String secret) 57 | { 58 | clientSecret = secret; 59 | header = "Token " + clientSecret; 60 | auth = Token; 61 | } 62 | 63 | FreesoundClient::FreesoundClient(String id, String secret) 64 | { 65 | clientID = id; 66 | clientSecret = secret; 67 | auth = OAuth; 68 | } 69 | 70 | //Function for doing the authorization, the mode selects between LOGOUT_AUTHORIZE(0) and AUTHORIZE(1) 71 | void FreesoundClient::authenticationOnBrowser(int mode, Callback cb) 72 | { 73 | URL url; 74 | if(mode == 0){url = URIS::uri(URIS::LOGOUT_AUTHORIZE, StringArray());} 75 | else{url = URIS::uri(URIS::AUTHORIZE, StringArray()); } 76 | url = url.withParameter("client_id", clientID); 77 | url = url.withParameter("response_type", "code"); 78 | url.launchInDefaultBrowser(); 79 | cb(); 80 | } 81 | 82 | void FreesoundClient::exchangeToken(String authCode, Callback cb) 83 | { 84 | StringPairArray params; 85 | params.set("client_id", clientID); 86 | params.set("client_secret", clientSecret); 87 | params.set("grant_type", "authorization_code"); 88 | params.set("code", authCode); 89 | 90 | URL url = URIS::uri(URIS::ACCESS_TOKEN, StringArray()); 91 | FSRequest request(url, *this); 92 | Response resp = request.request(params); 93 | int resultCode = resp.first; 94 | if (resultCode == 200) { 95 | var response = resp.second; 96 | accessToken = response["access_token"]; 97 | refreshToken = response["refresh_token"]; 98 | header = "Bearer " + accessToken; 99 | } 100 | cb(); 101 | } 102 | 103 | void FreesoundClient::refreshAccessToken(Callback cb) { 104 | StringPairArray params; 105 | params.set("client_id", clientID); 106 | params.set("client_secret", clientSecret); 107 | params.set("grant_type", "refresh_token"); 108 | params.set("refresh_token", refreshToken); 109 | 110 | URL url = URIS::uri(URIS::ACCESS_TOKEN, StringArray()); 111 | FSRequest request(url, *this); 112 | Response resp = request.request(params); 113 | int resultCode = resp.first; 114 | if (resultCode == 200) { 115 | var response = resp.second; 116 | accessToken = response["access_token"]; 117 | refreshToken = response["refresh_token"]; 118 | header = "Bearer " + accessToken; 119 | } 120 | cb(); 121 | } 122 | 123 | // https://freesound.org/docs/api/resources_apiv2.html#text-search 124 | SoundList FreesoundClient::textSearch(String query, String filter, String sort, int groupByPack, int page, int pageSize, String fields, String descriptors, int normalized) 125 | { 126 | StringPairArray params; 127 | params.set("query", query); 128 | params.set("sort", sort); 129 | params.set("group_by_pack", String(groupByPack)); 130 | 131 | if (filter.isNotEmpty()) { 132 | params.set("filter", filter); 133 | } 134 | 135 | if (page != -1) { 136 | params.set("page", String(page)); 137 | } 138 | 139 | if (pageSize != -1) { 140 | params.set("page_size", String(pageSize)); 141 | } 142 | 143 | if (fields.isNotEmpty()) { 144 | params.set("fields", fields); 145 | } 146 | 147 | if (descriptors.isNotEmpty()) { 148 | params.set("descriptors", descriptors); 149 | } 150 | 151 | if (normalized != 0) { 152 | params.set("normalized", "1"); 153 | } 154 | 155 | URL url = URIS::uri(URIS::TEXT_SEARCH, StringArray()); 156 | FSRequest request(url, *this); 157 | Response resp = request.request(params,String(),false); 158 | int resultCode = resp.first; 159 | if (resultCode == 200) { 160 | var response = resp.second; 161 | SoundList returnedSounds(response); 162 | return returnedSounds; 163 | } 164 | return SoundList(); 165 | } 166 | 167 | SoundList FreesoundClient::contentSearch(String target, String descriptorsFilter, int page, int pageSize, String fields, String descriptors, int normalized) 168 | { 169 | StringPairArray params; 170 | 171 | params.set("target", target); 172 | 173 | if (descriptorsFilter.isNotEmpty()) { 174 | params.set("descriptors_filter", descriptorsFilter); 175 | } 176 | 177 | if (page != -1) { 178 | params.set("page", String(page)); 179 | } 180 | 181 | if (pageSize != -1) { 182 | params.set("page_size", String(pageSize)); 183 | } 184 | 185 | if (fields.isNotEmpty()) { 186 | params.set("fields", fields); 187 | } 188 | 189 | if (descriptors.isNotEmpty()) { 190 | params.set("descriptors", descriptors); 191 | } 192 | 193 | if (normalized != 0) { 194 | params.set("normalized", "1"); 195 | } 196 | 197 | URL url = URIS::uri(URIS::CONTENT_SEARCH, StringArray()); 198 | FSRequest request(url, *this); 199 | Response resp = request.request(params, String(), false); 200 | int resultCode = resp.first; 201 | if (resultCode == 200) { 202 | var response = resp.second; 203 | SoundList returnedSounds(response); 204 | return returnedSounds; 205 | } 206 | return SoundList(); 207 | } 208 | 209 | FSList FreesoundClient::fetchNextPage(FSList soundList) 210 | { 211 | FSRequest request(soundList.getNextPage(), *this); 212 | Response resp = request.request(StringPairArray(), String(), false); 213 | int resultCode = resp.first; 214 | if (resultCode == 200) { 215 | var response = resp.second; 216 | FSList returnedSounds(response); 217 | return returnedSounds; 218 | } 219 | return FSList(); 220 | } 221 | 222 | FSList FreesoundClient::fetchPreviousPage(FSList soundList) 223 | { 224 | FSRequest request(soundList.getPreviousPage(), *this); 225 | Response resp = request.request(StringPairArray(), String(), false); 226 | int resultCode = resp.first; 227 | if (resultCode == 200) { 228 | var response = resp.second; 229 | FSList returnedSounds(response); 230 | return returnedSounds; 231 | } 232 | return FSList(); 233 | } 234 | 235 | SoundList FreesoundClient::fetchNextPage(SoundList soundList) 236 | { 237 | FSRequest request(soundList.getNextPage(), *this); 238 | Response resp = request.request(StringPairArray(), String(), false); 239 | int resultCode = resp.first; 240 | if (resultCode == 200) { 241 | var response = resp.second; 242 | SoundList returnedSounds(response); 243 | return returnedSounds; 244 | } 245 | return SoundList(); 246 | } 247 | 248 | SoundList FreesoundClient::fetchPreviousPage(SoundList soundList) 249 | { 250 | FSRequest request(soundList.getPreviousPage(), *this); 251 | Response resp = request.request(StringPairArray(), String(), false); 252 | int resultCode = resp.first; 253 | if (resultCode == 200) { 254 | var response = resp.second; 255 | SoundList returnedSounds(response); 256 | return returnedSounds; 257 | } 258 | return SoundList(); 259 | } 260 | 261 | FSSound FreesoundClient::getSound(String id, String fields) 262 | { 263 | URL url = URIS::uri(URIS::SOUND, StringArray(id)); 264 | StringPairArray params; 265 | if (fields.isNotEmpty()) { 266 | params.set("fields", fields); 267 | } 268 | 269 | FSRequest request(url, *this); 270 | Response resp = request.request(params, String(), false); 271 | int resultCode = resp.first; 272 | if (resultCode == 200) { 273 | var response = resp.second; 274 | FSSound returnedSound(response); 275 | return returnedSound; 276 | } 277 | 278 | return FSSound(); 279 | } 280 | 281 | var FreesoundClient::getSoundAnalysis(String id, String descriptors, int normalized) 282 | { 283 | StringPairArray params; 284 | 285 | if (descriptors.isNotEmpty()) { 286 | params.set("descriptors", descriptors); 287 | } 288 | 289 | if (normalized != 0) { 290 | params.set("normalized", "1"); 291 | } 292 | 293 | URL url = URIS::uri(URIS::SOUND_ANALYSIS, id); 294 | FSRequest request(url, *this); 295 | Response resp = request.request(params, String(), false); 296 | int resultCode = resp.first; 297 | if (resultCode == 200) { 298 | var response = resp.second; 299 | return response; 300 | } 301 | return var(); 302 | } 303 | 304 | SoundList FreesoundClient::getSimilarSounds(String id, String descriptorsFilter, int page, int pageSize, String fields, String descriptors, int normalized) 305 | { 306 | StringPairArray params; 307 | 308 | if (descriptorsFilter.isNotEmpty()) { 309 | params.set("descriptors_filter", descriptorsFilter); 310 | } 311 | 312 | if (page != -1) { 313 | params.set("page", String(page)); 314 | } 315 | 316 | if (pageSize != -1) { 317 | params.set("page_size", String(pageSize)); 318 | } 319 | 320 | if (fields.isNotEmpty()) { 321 | params.set("fields", fields); 322 | } 323 | 324 | if (descriptors.isNotEmpty()) { 325 | params.set("descriptors", descriptors); 326 | } 327 | 328 | if (normalized != 0) { 329 | params.set("normalized", "1"); 330 | } 331 | 332 | URL url = URIS::uri(URIS::SIMILAR_SOUNDS, id); 333 | FSRequest request(url, *this); 334 | Response resp = request.request(params, String(), false); 335 | int resultCode = resp.first; 336 | if (resultCode == 200) { 337 | var response = resp.second; 338 | SoundList returnedSounds(response); 339 | return returnedSounds; 340 | } 341 | return SoundList(); 342 | } 343 | 344 | URL::DownloadTask* FreesoundClient::downloadSound(FSSound sound, const File & location, URL::DownloadTask::Listener * listener) 345 | { 346 | URL address = sound.getDownload(); 347 | return address.downloadToFile(location, "Authorization: " + header, listener); 348 | } 349 | 350 | URL::DownloadTask* FreesoundClient::downloadOGGSoundPreview(FSSound sound, const File & location, URL::DownloadTask::Listener * listener) 351 | { 352 | URL address = sound.getOGGPreviewURL(); 353 | return address.downloadToFile(location, "", listener); 354 | } 355 | 356 | URL::DownloadTask* FreesoundClient::downloadMP3SoundPreview(FSSound sound, const File & location, URL::DownloadTask::Listener * listener) 357 | { 358 | URL address = sound.getMP3PreviewURL(); 359 | return address.downloadToFile(location, "", listener); 360 | } 361 | 362 | int FreesoundClient::uploadSound(const File & fileToUpload, String tags, String description, String name, String license, String pack, String geotag, Callback cb) 363 | { 364 | StringPairArray params; 365 | 366 | params.set("tags", tags); 367 | params.set("description", description); 368 | params.set("license", license); 369 | 370 | if (name.isNotEmpty()) { 371 | params.set("name", name); 372 | } 373 | 374 | if (pack.isNotEmpty()) { 375 | params.set("pack", pack); 376 | } 377 | 378 | if (geotag.isNotEmpty()) { 379 | params.set("geotag", geotag); 380 | } 381 | 382 | URL url = URIS::uri(URIS::UPLOAD); 383 | url = url.withFileToUpload("audiofile", fileToUpload, "audio/*"); 384 | FSRequest request(url, *this); 385 | Response resp = request.request(params, String(), false); 386 | int resultCode = resp.first; 387 | if (resultCode == 200) { 388 | var response = resp.second; 389 | cb(); 390 | return response["id"]; 391 | } 392 | cb(); 393 | return 0; 394 | } 395 | 396 | int FreesoundClient::describeSound(String uploadFilename, String description, String license, String name, String tags, String pack, String geotag) 397 | { 398 | StringPairArray params; 399 | params.set("upload_filename", uploadFilename); 400 | params.set("license", license); 401 | params.set("description", description); 402 | 403 | 404 | if (tags.isNotEmpty()) { 405 | params.set("tags", tags); 406 | } 407 | 408 | if (name.isNotEmpty()) { 409 | params.set("name", name); 410 | } 411 | 412 | if (pack.isNotEmpty()) { 413 | params.set("pack", pack); 414 | } 415 | 416 | if (geotag.isNotEmpty()) { 417 | params.set("geotag", geotag); 418 | } 419 | 420 | URL url = URIS::uri(URIS::DESCRIBE); 421 | FSRequest request(url, *this); 422 | Response resp = request.request(params, String(), false); 423 | int resultCode = resp.first; 424 | if (resultCode == 200) { 425 | } 426 | 427 | return resp.second["id"]; 428 | } 429 | 430 | var FreesoundClient::pendingUploads() 431 | { 432 | URL url = URIS::uri(URIS::PENDING); 433 | FSRequest request(url, *this); 434 | Response resp = request.request(StringPairArray(), String(), false); 435 | int resultCode = resp.first; 436 | if (resultCode == 200) { 437 | } 438 | 439 | return resp.second; 440 | } 441 | 442 | void FreesoundClient::editSoundDescription(String id, String name, String tags, String description, String license, String pack, String geotag, Callback cb) 443 | { 444 | StringPairArray params; 445 | 446 | if (tags.isNotEmpty()) { 447 | params.set("tags", tags); 448 | } 449 | 450 | if (description.isNotEmpty()) { 451 | params.set("description", description); 452 | } 453 | 454 | if (license.isNotEmpty()) { 455 | params.set("license", license); 456 | } 457 | 458 | if (name.isNotEmpty()) { 459 | params.set("name", name); 460 | } 461 | 462 | if (pack.isNotEmpty()) { 463 | params.set("pack", pack); 464 | } 465 | 466 | if (geotag.isNotEmpty()) { 467 | params.set("geotag", geotag); 468 | } 469 | 470 | URL url = URIS::uri(URIS::EDIT, id); 471 | FSRequest request(url, *this); 472 | Response resp = request.request(params, String(), false); 473 | int resultCode = resp.first; 474 | if (resultCode == 200) { 475 | } 476 | 477 | cb(); 478 | 479 | } 480 | 481 | void FreesoundClient::bookmarkSound(String id, String name, String category, Callback cb) 482 | { 483 | StringPairArray params; 484 | 485 | if (name.isNotEmpty()) { 486 | params.set("name", name); 487 | } 488 | 489 | if (category.isNotEmpty()) { 490 | params.set("category", category); 491 | } 492 | 493 | URL url = URIS::uri(URIS::BOOKMARK, id); 494 | FSRequest request(url, *this); 495 | Response resp = request.request(params, String(), false); 496 | int resultCode = resp.first; 497 | if (resultCode == 200) { 498 | } 499 | cb(); 500 | } 501 | 502 | void FreesoundClient::rateSound(String id, int rating, Callback cb) 503 | { 504 | StringPairArray params; 505 | params.set("rating", String(rating)); 506 | 507 | URL url = URIS::uri(URIS::RATE, id); 508 | FSRequest request(url, *this); 509 | Response resp = request.request(params, String(), false); 510 | int resultCode = resp.first; 511 | if (resultCode == 200) { 512 | } 513 | 514 | cb(); 515 | } 516 | 517 | void FreesoundClient::commentSound(String id, String comment, Callback cb) 518 | { 519 | StringPairArray params; 520 | params.set("comment", comment); 521 | 522 | URL url = URIS::uri(URIS::RATE, id); 523 | FSRequest request(url, *this); 524 | Response resp = request.request(params, String(), false); 525 | int resultCode = resp.first; 526 | if (resultCode == 200) { 527 | } 528 | cb(); 529 | } 530 | 531 | FSUser FreesoundClient::getUser(String user) 532 | { 533 | URL url = URIS::uri(URIS::USER, StringArray(user)); 534 | FSRequest request(url, *this); 535 | Response resp = request.request(StringPairArray(), String(), false); 536 | int resultCode = resp.first; 537 | if (resultCode == 200) { 538 | var response = resp.second; 539 | FSUser returnedUser(response); 540 | return returnedUser; 541 | } 542 | 543 | return FSUser(); 544 | } 545 | 546 | SoundList FreesoundClient::getUserSounds(String username, String descriptorsFilter, int page, int pageSize, String fields, String descriptors, int normalized) 547 | { 548 | StringPairArray params; 549 | 550 | if (descriptorsFilter.isNotEmpty()) { 551 | params.set("descriptors_filter", descriptorsFilter); 552 | } 553 | 554 | if (page != -1) { 555 | params.set("page", String(page)); 556 | } 557 | 558 | if (pageSize != -1) { 559 | params.set("page_size", String(pageSize)); 560 | } 561 | 562 | if (fields.isNotEmpty()) { 563 | params.set("fields", fields); 564 | } 565 | 566 | if (descriptors.isNotEmpty()) { 567 | params.set("descriptors", descriptors); 568 | } 569 | 570 | if (normalized != 0) { 571 | params.set("normalized", "1"); 572 | } 573 | 574 | URL url = URIS::uri(URIS::USER_SOUNDS, username); 575 | FSRequest request(url, *this); 576 | Response resp = request.request(params, String(), false); 577 | int resultCode = resp.first; 578 | if (resultCode == 200) { 579 | var response = resp.second; 580 | SoundList returnedSounds(response); 581 | return returnedSounds; 582 | } 583 | return SoundList(); 584 | } 585 | 586 | FSList FreesoundClient::getUserBookmarkCategories(String username) 587 | { 588 | URL url = URIS::uri(URIS::USER_BOOKMARK_CATEGORIES, username); 589 | FSRequest request(url, *this); 590 | Response resp = request.request(StringPairArray(), String(), false); 591 | int resultCode = resp.first; 592 | if (resultCode == 200) { 593 | var response = resp.second; 594 | FSList returnedSounds(response); 595 | return returnedSounds; 596 | } 597 | return FSList(); 598 | } 599 | 600 | FSList FreesoundClient::getUserBookmarkCategoriesSounds(String username, String bookmarkCategory) 601 | { 602 | StringArray params; 603 | params.add(username); 604 | params.add(bookmarkCategory); 605 | URL url = URIS::uri(URIS::USER_BOOKMARK_CATEGORY_SOUNDS, params); 606 | FSRequest request(url, *this); 607 | Response resp = request.request(StringPairArray(), String(), false); 608 | int resultCode = resp.first; 609 | if (resultCode == 200) { 610 | var response = resp.second; 611 | FSList returnedSounds(response); 612 | return returnedSounds; 613 | } 614 | return FSList(); 615 | } 616 | 617 | FSList FreesoundClient::getUserPacks(String username) 618 | { 619 | URL url = URIS::uri(URIS::USER_PACKS, username); 620 | FSRequest request(url, *this); 621 | Response resp = request.request(StringPairArray(), String(), false); 622 | int resultCode = resp.first; 623 | if (resultCode == 200) { 624 | var response = resp.second; 625 | FSList returnedSounds(response); 626 | return returnedSounds; 627 | } 628 | return FSList(); 629 | } 630 | 631 | FSPack FreesoundClient::getPack(String id) 632 | { 633 | URL url = URIS::uri(URIS::PACK, StringArray(id)); 634 | FSRequest request(url, *this); 635 | Response resp = request.request(StringPairArray(), String(), false); 636 | int resultCode = resp.first; 637 | if (resultCode == 200) { 638 | var response = resp.second; 639 | FSPack returnedUser(response); 640 | return returnedUser; 641 | } 642 | 643 | return FSPack(); 644 | } 645 | 646 | SoundList FreesoundClient::getPackSounds(String id, String descriptorsFilter, int page, int pageSize, String fields, String descriptors, int normalized) 647 | { 648 | StringPairArray params; 649 | 650 | if (descriptorsFilter.isNotEmpty()) { 651 | params.set("descriptors_filter", descriptorsFilter); 652 | } 653 | 654 | if (page != -1) { 655 | params.set("page", String(page)); 656 | } 657 | 658 | if (pageSize != -1) { 659 | params.set("page_size", String(pageSize)); 660 | } 661 | 662 | if (fields.isNotEmpty()) { 663 | params.set("fields", fields); 664 | } 665 | 666 | if (descriptors.isNotEmpty()) { 667 | params.set("descriptors", descriptors); 668 | } 669 | 670 | if (normalized != 0) { 671 | params.set("normalized", "1"); 672 | } 673 | 674 | URL url = URIS::uri(URIS::PACK_SOUNDS, StringArray(id)); 675 | FSRequest request(url, *this); 676 | Response resp = request.request(params, String(), false); 677 | int resultCode = resp.first; 678 | if (resultCode == 200) { 679 | var response = resp.second; 680 | SoundList returnedSounds(response); 681 | return returnedSounds; 682 | } 683 | return SoundList(); 684 | } 685 | 686 | URL::DownloadTask* FreesoundClient::downloadPack(FSPack pack, const File & location, URL::DownloadTask::Listener * listener) 687 | { 688 | 689 | URL address = URIS::uri(URIS::PACK_DOWNLOAD, StringArray(pack.getID())); 690 | return address.downloadToFile(location, this->header, listener); 691 | 692 | } 693 | 694 | FSUser FreesoundClient::getMe() 695 | { 696 | URL url = URIS::uri(URIS::ME, StringArray()); 697 | FSRequest request(url, *this); 698 | Response resp = request.request(StringPairArray(), String(), false); 699 | int resultCode = resp.first; 700 | if (resultCode == 200) { 701 | var response = resp.second; 702 | FSUser returnedUser(response); 703 | return returnedUser; 704 | } 705 | 706 | return FSUser(); 707 | } 708 | 709 | 710 | bool FreesoundClient::isTokenNotEmpty() 711 | { 712 | if (header.isNotEmpty()) { return true; } 713 | else { return false; } 714 | } 715 | 716 | String FreesoundClient::getToken() 717 | { 718 | return token; 719 | } 720 | 721 | String FreesoundClient::getHeader() 722 | { 723 | return header; 724 | } 725 | 726 | String FreesoundClient::getClientID() 727 | { 728 | return clientID; 729 | } 730 | 731 | 732 | 733 | 734 | void FreesoundClientComponent::startAuthentication(int mode) 735 | { 736 | URL url; 737 | if (mode == 0) { url = URIS::uri(URIS::LOGOUT_AUTHORIZE, StringArray()); } 738 | else { url = URIS::uri(URIS::AUTHORIZE, StringArray()); } 739 | url = url.withParameter("client_id", getClientID()); 740 | url = url.withParameter("response_type", "code"); 741 | goToURL(url.toString(true)); 742 | } 743 | 744 | 745 | 746 | void FreesoundClientComponent::pageFinishedLoading(const String &url, Callback authCallback) { 747 | if (url.startsWith(URIS::CONFIRMATION)) { 748 | URL recUrl(url); 749 | StringArray paramNames = recUrl.getParameterNames(); 750 | StringArray paramVals = recUrl.getParameterValues(); 751 | 752 | int codeInd = paramNames.indexOf("code", true, 0); 753 | authCode = paramVals[codeInd]; 754 | authCallback(); 755 | 756 | } 757 | 758 | } 759 | 760 | 761 | void FreesoundClientComponent::pageLoadHadNetworkError() { 762 | startAuthentication(); 763 | } 764 | 765 | 766 | 767 | Response FSRequest::request(StringPairArray params, String data, bool postLikeRequest) 768 | { 769 | 770 | URL url = uri; 771 | String header; 772 | int statusCode = -1; 773 | StringPairArray responseHeaders; 774 | if (data.isNotEmpty()) { url = url.withPOSTData(data); } 775 | if (params.size() != 0) { url = url.withParameters(params); } 776 | if (client.isTokenNotEmpty()) { header = "Authorization: " + client.getHeader(); } 777 | 778 | 779 | //Try to open a stream with this information. 780 | if (auto stream = std::unique_ptr(url.createInputStream(postLikeRequest, nullptr, nullptr, header, 781 | 10000, // timeout in millisecs 782 | &responseHeaders, &statusCode))) 783 | { 784 | //Stream created successfully, store the response, log it and return the response in a pair containing (statusCode, response) 785 | String resp = stream->readEntireStreamAsString(); 786 | var response = JSON::parse(resp); 787 | return Response(statusCode, response); 788 | } 789 | //Couldnt create stream, return (-1, emptyVar) 790 | return Response(statusCode, var()); 791 | } 792 | 793 | FSList::FSList() 794 | { 795 | count = 0; 796 | } 797 | 798 | FSList::FSList(var response) 799 | { 800 | count = response["count"]; //getIntValue 801 | nextPage = response["next"]; 802 | previousPage = response["previous"]; 803 | results = response["results"]; 804 | } 805 | 806 | String FSList::getNextPage() 807 | { 808 | return nextPage; 809 | } 810 | 811 | String FSList::getPreviousPage() 812 | { 813 | return previousPage; 814 | } 815 | 816 | var FSList::getResults() 817 | { 818 | return results; 819 | } 820 | 821 | int FSList::getCount() 822 | { 823 | return count; 824 | } 825 | 826 | FSSound::FSSound() 827 | { 828 | } 829 | 830 | FSSound::FSSound(var sound) 831 | { 832 | id = sound["id"]; 833 | url = URL(sound["url"]); 834 | name = sound["name"]; 835 | tags = StringArray(); 836 | //Verificar que isto está bem. sound[tags]precisa de ser um array 837 | for (int i = 0; i < sound["tags"].size(); i++) { 838 | tags.add(sound["tags"][i]); 839 | } 840 | description = sound["description"]; 841 | geotag = sound["geotag"]; 842 | created = sound["created"]; 843 | license = sound["license"]; 844 | format = sound["type"]; 845 | channels = sound["channels"]; 846 | filesize = sound["filesize"]; 847 | bitrate = sound["bitrate"]; 848 | bitdepth = sound["bitdepth"]; 849 | duration = sound["duration"]; 850 | samplerate = sound["samplerate"]; 851 | user = sound["username"]; 852 | pack = URL(sound["pack"]); 853 | download = URL(sound["download"]); 854 | bookmark = URL(sound["bookmark"]); 855 | previews = sound["previews"]; 856 | images = sound["images"]; 857 | numDownloads = sound["images"]; 858 | avgRating = sound["num_downloads"]; 859 | numRatings = sound["avg_rating"]; 860 | rate = URL(sound["rate"]); 861 | comments = URL(sound["comments"]); 862 | numComments = sound["num_comments"]; 863 | comment = URL(sound["comment"]); 864 | similarSounds = URL(sound["similar_sounds"]); 865 | analysis = sound["analysis"]; 866 | analysisStats = URL(sound["analysis_stats"]); 867 | analysisFrames = URL(sound["analysis_frames"]); 868 | acAnalysis = sound["ac_analysis"]; 869 | 870 | } 871 | 872 | URL FSSound::getDownload() 873 | { 874 | return download; 875 | } 876 | 877 | URL FSSound::getOGGPreviewURL() 878 | { 879 | if (!previews.hasProperty("preview-hq-ogg")){ 880 | /* 881 | If you reached this bit of code is because you're trying to download the preview of a sound 882 | but the freesound-juce client does not know the URL where to find that preview. 883 | 884 | It can happen that the FSSound object does not have "previews" property if the object was 885 | constructed from the results of a SoundList (e.g. using SoundList::toSoundArray method) and 886 | the "previews" field was not initially requested in the query that created the SoundList 887 | object. If you just reached this bit of code, make sure that you include the "previews" field 888 | in the "fields" parameter of the function that generated the SoundList. 889 | */ 890 | throw; 891 | } 892 | return URL(previews["preview-hq-ogg"]); 893 | } 894 | 895 | URL FSSound::getMP3PreviewURL() 896 | { 897 | if (!previews.hasProperty("preview-hq-mp3")) { 898 | /* 899 | If you reached this bit of code is because you're trying to download the preview of a sound 900 | but the freesound-juce client does not know the URL where to find that preview. 901 | 902 | It can happen that the FSSound object does not have "previews" property if the object was 903 | constructed from the results of a SoundList (e.g. using SoundList::toSoundArray method) and 904 | the "previews" field was not initially requested in the query that created the SoundList 905 | object. If you just reached this bit of code, make sure that you include the "previews" field 906 | in the "fields" parameter of the function that generated the SoundList. 907 | */ 908 | throw; 909 | } 910 | return URL(previews["preview-hq-mp3"]); 911 | } 912 | 913 | FSUser::FSUser() 914 | { 915 | } 916 | 917 | FSUser::FSUser(var user) 918 | { 919 | profile = URL(user["url"]); 920 | about = user["about"]; 921 | username = user["username"]; 922 | homepage = URL(user["homepage"]); 923 | avatar = user["avatar"]; 924 | dateJoined = user["date_joined"]; 925 | numSounds = user["num_sounds"]; 926 | sounds = URL(user["sounds"]); 927 | numPacks = user["num_packs"]; 928 | packs = URL(user["packs"]); 929 | numPosts = user["num_posts"]; 930 | numComments = user["num_comments"]; 931 | bookmarks = URL(user["bookmarks"]); 932 | 933 | } 934 | 935 | FSPack::FSPack() 936 | { 937 | } 938 | 939 | FSPack::FSPack(var pack) 940 | { 941 | id = pack["id"]; 942 | url = URL(pack["url"]); 943 | description = pack["description"]; 944 | created = pack["created"]; 945 | name = pack["name"]; 946 | username = pack["username"]; 947 | numSounds = pack["num_sounds"]; 948 | sounds = URL(pack["sounds"]); 949 | numDownloads = pack["num_downloads"]; 950 | } 951 | 952 | String FSPack::getID() 953 | { 954 | return id; 955 | } 956 | 957 | Array SoundList::toArrayOfSounds() 958 | { 959 | 960 | 961 | Array arrayOfSounds; 962 | 963 | for (int i = 0; i < results.size(); i++) 964 | { 965 | arrayOfSounds.add(FSSound(results[i])); 966 | } 967 | 968 | return arrayOfSounds; 969 | } 970 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/FreesoundAPI.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | A JUCE client for the Freesound API. 5 | 6 | Find the API documentation at http://www.freesound.org/docs/api/. 7 | 8 | Apply for an API key at http://www.freesound.org/api/apply/. 9 | 10 | The client automatically maps function arguments to http parameters of the API. 11 | JSON results are converted to JUCE objects. The main object types (Sound, 12 | User, Pack) are augmented with the corresponding API calls. 13 | 14 | 15 | Created: 30 May 2019 12:49:28pm 16 | Author: Antonio Ramires (Music Technology Group - Universitat Pompeu Fabra) 17 | 18 | ============================================================================== 19 | */ 20 | 21 | 22 | #pragma once 23 | 24 | #include "../JuceLibraryCode/JuceHeader.h" 25 | 26 | /** 27 | * \typedef std::pair Response 28 | * 29 | * \brief Defines an alias representing a response for a request 30 | */ 31 | 32 | typedef std::pair Response; 33 | 34 | /** 35 | * \typedef std::function Callback 36 | * 37 | * \brief Defines an alias representing a void callback function, to be called when 38 | * the calls to the API finish 39 | */ 40 | 41 | typedef std::function Callback; 42 | 43 | /** 44 | * \class FSList 45 | * 46 | * \brief Class representing a page from a Freesound response. Contains methods for 47 | * automatically paging through the different pages, knowing the number of 48 | * total results and the results on the page. 49 | * 50 | * \author Antonio 51 | * \date 09/07/2019 52 | */ 53 | 54 | class FSList { 55 | protected: 56 | /** \brief Total number of results returned from the FS response */ 57 | int count; 58 | /** \brief URL for accessing the next page of results */ 59 | String nextPage; 60 | /** \brief URL for accessing the previous page of results */ 61 | String previousPage; 62 | /** \brief var variable containing the results of the page */ 63 | var results; 64 | public: 65 | 66 | /** 67 | * \fn FSList::FSList(); 68 | * 69 | * \brief Default constructor, creates an empty object 70 | * 71 | * \author Antonio 72 | * \date 09/07/2019 73 | */ 74 | 75 | FSList(); 76 | 77 | /** 78 | * \fn FSList::FSList(var response); 79 | * 80 | * \brief Constructor from the var object which contains the response from FS API, 81 | * automatically obtaining the next and previous page; the total of results 82 | * and the results of the page 83 | * 84 | * \author Antonio 85 | * \date 09/07/2019 86 | * 87 | * \param response The response from a FS API call which returns a list. 88 | */ 89 | 90 | FSList(var response); 91 | 92 | /** 93 | * \fn String FSList::getNextPage(); 94 | * 95 | * \brief Returns the URL for the next page 96 | * 97 | * \author Antonio 98 | * \date 09/07/2019 99 | * 100 | * \returns The next page URL. 101 | */ 102 | 103 | String getNextPage(); 104 | 105 | /** 106 | * \fn String FSList::getPreviousPage(); 107 | * 108 | * \brief Returns the URL for the previous page 109 | * 110 | * \author Antonio 111 | * \date 09/07/2019 112 | * 113 | * \returns The previous page URL. 114 | */ 115 | 116 | String getPreviousPage(); 117 | 118 | /** 119 | * \fn var FSList::getResults(); 120 | * 121 | * \brief Returns the results from the current page 122 | * 123 | * \author Antonio 124 | * \date 09/07/2019 125 | * 126 | * \returns The results of the current page. 127 | */ 128 | 129 | var getResults(); 130 | 131 | /** 132 | * \fn int FSList::getCount(); 133 | * 134 | * \brief Gets the number of entries in the complete list 135 | * 136 | * \author Antonio 137 | * \date 09/07/2019 138 | * 139 | * \returns The count of entries in the list. 140 | */ 141 | 142 | int getCount(); 143 | 144 | }; 145 | 146 | /** 147 | * \class URIS 148 | * 149 | * \brief A class which cointains all variables and methods for creating URL objects 150 | * for performing the queries to Freesound 151 | * 152 | * \author Antonio 153 | * \date 09/07/2019 154 | */ 155 | 156 | class URIS { 157 | 158 | public: 159 | 160 | /** \brief Freesound website */ 161 | static String HOST; 162 | /** \brief The base URL for the requests*/ 163 | static String BASE; 164 | /** \brief The text search resource*/ 165 | static String TEXT_SEARCH; 166 | /** \brief The content search resource*/ 167 | static String CONTENT_SEARCH; 168 | /** \brief The combined search resource, not implemented*/ 169 | static String COMBINED_SEARCH; 170 | /** \brief The sound instance resource*/ 171 | static String SOUND; 172 | /** \brief The sound analysis resource */ 173 | static String SOUND_ANALYSIS; 174 | /** \brief The similar sounds resource */ 175 | static String SIMILAR_SOUNDS; 176 | /** \brief The sound comments resource*/ 177 | static String COMMENTS; 178 | /** \brief The download sound resource*/ 179 | static String DOWNLOAD; 180 | /** \brief The upload sound resource*/ 181 | static String UPLOAD; 182 | /** \brief The describe sound resource*/ 183 | static String DESCRIBE; 184 | /** \brief The pending uploads resource*/ 185 | static String PENDING; 186 | /** \brief The bookmark sound resource*/ 187 | static String BOOKMARK; 188 | /** \brief The rate sound resource*/ 189 | static String RATE; 190 | /** \brief The comment sound resource*/ 191 | static String COMMENT; 192 | /** \brief The authorization resource */ 193 | static String AUTHORIZE; 194 | /** \brief The logout resource*/ 195 | static String LOGOUT; 196 | /** \brief The logout and authorize resource*/ 197 | static String LOGOUT_AUTHORIZE; 198 | /** \brief The get access token resource*/ 199 | static String ACCESS_TOKEN; 200 | /** \brief The me resource*/ 201 | static String ME; 202 | /** \brief The user instance resource*/ 203 | static String USER; 204 | /** \brief The get user sounds resource*/ 205 | static String USER_SOUNDS; 206 | /** \brief The get user packs resource*/ 207 | static String USER_PACKS; 208 | /** \brief The get user bookmark categories resources*/ 209 | static String USER_BOOKMARK_CATEGORIES; 210 | /** \brief The user bookmark category sounds resources*/ 211 | static String USER_BOOKMARK_CATEGORY_SOUNDS; 212 | /** \brief The get pack instance resource*/ 213 | static String PACK; 214 | /** \brief The pack sounds */ 215 | static String PACK_SOUNDS; 216 | /** \brief The pack download resource*/ 217 | static String PACK_DOWNLOAD; 218 | /** \brief The confirmation URL*/ 219 | static String CONFIRMATION; 220 | /** \brief The edit sound resource*/ 221 | static String EDIT; 222 | 223 | /** 224 | * \fn URIS::URIS() 225 | * 226 | * \brief Default constructor, creates an empty object 227 | * 228 | * \author Antonio 229 | * \date 09/07/2019 230 | */ 231 | 232 | URIS(){ 233 | } 234 | 235 | /** 236 | * \fn URIS::~URIS() 237 | * 238 | * \brief Destructor 239 | * 240 | * \author Antonio 241 | * \date 09/07/2019 242 | */ 243 | 244 | ~URIS() { 245 | } 246 | 247 | /** 248 | * \fn static URL URIS::uri(String uri, StringArray replacements = StringArray()); 249 | * 250 | * \brief Creates an URL given a URI from the static URIS and a String array with 251 | * the parameters 252 | * 253 | * \author Antonio 254 | * \date 09/07/2019 255 | * 256 | * \param uri URI of the resource. 257 | * \param replacements (Optional) The arguments for the URL. 258 | * 259 | * \returns The URL for the request. 260 | */ 261 | 262 | static URL uri(String uri, StringArray replacements = StringArray()); 263 | }; 264 | 265 | /** 266 | * \class FSUser 267 | * 268 | * \brief A class which represents a Freesound user and its information. 269 | * 270 | * \author Antonio 271 | * \date 09/07/2019 272 | */ 273 | 274 | class FSUser { 275 | 276 | public: 277 | /** \brief The URL of the user profile in Freesound*/ 278 | URL profile; 279 | /** \brief The username */ 280 | String username; 281 | /** \brief The ‘about’ text of users’ profile (if indicated)*/ 282 | String about; 283 | /** \brief The URI of users’ homepage outside Freesound (if indicated)*/ 284 | URL homepage; 285 | /** \brief Dictionary including the URIs for the avatar of the user. 286 | The avatar is presented in three sizes Small, Medium and Large, which 287 | correspond to the three fields in the dictionary. 288 | If user has no avatar, this field is null.*/ 289 | var avatar; 290 | /** \brief The date when the user joined Freesound */ 291 | String dateJoined; 292 | /** \brief Number of sounds uploaded by the user*/ 293 | int numSounds; 294 | /** \brief The URI for a list of sounds by the user*/ 295 | URL sounds; 296 | /** \brief The number of packs by the user*/ 297 | int numPacks; 298 | /** \brief The URI for a list of packs by the user*/ 299 | URL packs; 300 | /** \brief The number of forum posts by the user */ 301 | int numPosts; 302 | /** \brief The number of comments that user made in other users’ sounds*/ 303 | int numComments; 304 | /** \brief The URI for a list of bookmark categories by the user*/ 305 | URL bookmarks; 306 | 307 | /** 308 | * \fn FSUser::FSUser(); 309 | * 310 | * \brief Default constructor, creates an empy User object 311 | * 312 | * \author Antonio 313 | * \date 09/07/2019 314 | */ 315 | 316 | FSUser(); 317 | 318 | /** 319 | * \fn FSUser::FSUser(var user); 320 | * 321 | * \brief Constructor from the response of a user instance request 322 | * 323 | * \author Antonio 324 | * \date 09/07/2019 325 | * 326 | * \param user The response of a user instance request. 327 | */ 328 | 329 | FSUser(var user); 330 | }; 331 | 332 | /** 333 | * \class FSPack 334 | * 335 | * \brief A class which implements the Pack instance. 336 | * 337 | * \author Antonio 338 | * \date 09/07/2019 339 | */ 340 | 341 | class FSPack { 342 | 343 | public: 344 | /** \brief The unique identifier of this pack*/ 345 | String id; 346 | /** \brief The URI for this pack on the Freesound website*/ 347 | URL url; 348 | /** \brief The URI for this pack on the Freesound website */ 349 | String description; 350 | /** \brief The date when the pack was created */ 351 | String created; 352 | /** \brief The name user gave to the pack */ 353 | String name; 354 | /** \brief Username of the creator of the pack */ 355 | String username; 356 | /** \brief The number of sounds in the pack */ 357 | int numSounds; 358 | /** \brief The URI for a list of sounds in the pack */ 359 | URL sounds; 360 | /** \brief The number of times this pack has been downloaded */ 361 | int numDownloads; 362 | 363 | /** 364 | * \fn FSPack::FSPack(); 365 | * 366 | * \brief Default constructor, creates an empty Pack object 367 | * 368 | * \author Antonio 369 | * \date 09/07/2019 370 | */ 371 | 372 | FSPack(); 373 | 374 | /** 375 | * \fn FSPack::FSPack(var pack); 376 | * 377 | * \brief Constructor from the response of a pack instance request 378 | * 379 | * \author Antonio 380 | * \date 09/07/2019 381 | * 382 | * \param pack The response of a pack instance request. 383 | */ 384 | 385 | FSPack(var pack); 386 | 387 | /** 388 | * \fn String FSPack::getID(); 389 | * 390 | * \brief Gets the identifier of the pack 391 | * 392 | * \author Antonio 393 | * \date 09/07/2019 394 | * 395 | * \returns The unique identifier of this pack. 396 | */ 397 | 398 | String getID(); 399 | }; 400 | 401 | /** 402 | * \class FSSound 403 | * 404 | * \brief A class which implements the Sound instance. 405 | * 406 | * \author Antonio 407 | * \date 09/07/2019 408 | */ 409 | 410 | class FSSound { 411 | public: 412 | /** \brief The sound’s unique identifier */ 413 | String id; 414 | /** \brief The URI for this sound on the Freesound website*/ 415 | URL url; 416 | /** \brief The name user gave to the sound*/ 417 | String name; 418 | /** \brief An array of tags the user gave to the sound */ 419 | StringArray tags; 420 | /** \brief The description the user gave to the sound*/ 421 | String description; 422 | /** \brief Latitude and longitude of the geotag separated by spaces */ 423 | String geotag; 424 | /** \brief The date when the sound was uploaded */ 425 | String created; 426 | /** \brief The license under which the sound is available */ 427 | String license; 428 | /** \brief The type of sound (wav, aif, aiff, mp3, m4a or flac) */ 429 | String format; 430 | /** \brief The number of channels */ 431 | int channels; 432 | /** \brief The size of the file in bytes */ 433 | int filesize; 434 | /** \brief The bit rate of the sound in kbps */ 435 | int bitrate; 436 | /** \brief The bit depth of the sound */ 437 | int bitdepth; 438 | /** \brief The duration of the sound in seconds */ 439 | int duration; 440 | /** \brief The samplerate of the sound */ 441 | int samplerate; 442 | /** \brief The username of the uploader of the sound */ 443 | String user; 444 | /** \brief If the sound is part of a pack, this URI points to that pack’s API resource */ 445 | URL pack; 446 | /** \brief The URI for retrieving the original sound */ 447 | URL download; 448 | /** \brief The URI for bookmarking the sound */ 449 | URL bookmark; 450 | /** \brief Dictionary containing the URIs for mp3 and ogg versions of the sound */ 451 | var previews; 452 | /** \brief Dictionary including the URIs for spectrogram and waveform visualizations of the sound */ 453 | var images; 454 | /** \brief The number of times the sound was downloaded */ 455 | int numDownloads; 456 | /** \brief The average rating of the sound */ 457 | float avgRating; 458 | /** \brief The number of times the sound was rated */ 459 | int numRatings; 460 | /** \brief The URI for rating the sound */ 461 | URL rate; 462 | /** \brief The URI of a paginated list of the comments of the sound */ 463 | URL comments; 464 | /** \brief The number of comments */ 465 | int numComments; 466 | /** \brief The URI to comment the sound*/ 467 | URL comment; 468 | /** \brief URI pointing to the similarity resource (to get a list of similar sounds) */ 469 | URL similarSounds; 470 | /** \brief Dictionary containing requested descriptors information according to the 471 | descriptors request parameter */ 472 | var analysis; 473 | /** \brief URI pointing to the complete analysis results of the sound */ 474 | URL analysisStats; 475 | /** \brief The URI for retrieving a JSON file with analysis information for each frame of the sound */ 476 | URL analysisFrames; 477 | /** \brief Dictionary containing the results of the AudioCommons analysis for the given sound */ 478 | var acAnalysis; 479 | 480 | /** 481 | * \fn FSSound::FSSound(); 482 | * 483 | * \brief Default constructor, creates an empty FSSound object 484 | * 485 | * \author Antonio 486 | * \date 09/07/2019 487 | */ 488 | 489 | FSSound(); 490 | 491 | /** 492 | * \fn FSSound::FSSound(var sound); 493 | * 494 | * \brief Constructor from the response of a sound instance request 495 | * 496 | * \author Antonio 497 | * \date 09/07/2019 498 | * 499 | * \param sound The response of a sound instance request 500 | */ 501 | 502 | FSSound(var sound); 503 | 504 | /** 505 | * \fn URL FSSound::getDownload(); 506 | * 507 | * \brief Gets the sound download URL 508 | * 509 | * \author Antonio 510 | * \date 09/07/2019 511 | * 512 | * \returns The sound download URL. 513 | */ 514 | 515 | URL getDownload(); 516 | 517 | /** 518 | * \fn URL FSSound::getOGGPreviewURL(); 519 | * 520 | * \brief Gets the sound the URL of the OGG preview of a sound 521 | * 522 | * \author Frederic 523 | * \date 12/09/2019 524 | * 525 | * \returns The OGG preview URL. 526 | */ 527 | 528 | URL getOGGPreviewURL(); 529 | 530 | URL getMP3PreviewURL(); 531 | 532 | }; 533 | 534 | /** 535 | * \class SoundList 536 | * 537 | * \brief A class which implements the sound list returned from certain queries to Freesound API, 538 | * which inherits FSList, containing a method to convert itself to an array of FSSounds. 539 | * 540 | * \author Antonio 541 | * \date 09/07/2019 542 | */ 543 | 544 | class SoundList : public FSList { 545 | using FSList::FSList; 546 | public: 547 | 548 | /** 549 | * \fn Array SoundList::toArrayOfSounds(); 550 | * 551 | * \brief Creates a copy of this object as an array of FSSound 552 | * 553 | * \author Antonio 554 | * \date 09/07/2019 555 | * 556 | * \returns A copy of this object as an array of FSSound; 557 | */ 558 | 559 | Array toArrayOfSounds(); 560 | }; 561 | 562 | /** 563 | * \class FreesoundClient 564 | * 565 | * \brief The Freesound client class which is responsible for all authorization and 566 | * requests to the Freesound API 567 | * 568 | * \author Antonio 569 | * \date 09/07/2019 570 | */ 571 | 572 | class FreesoundClient{ 573 | 574 | private: 575 | 576 | /** 577 | * \enum Authorization 578 | * 579 | * \brief Values that represent the possible authorization methods 580 | */ 581 | 582 | enum Authorization 583 | { 584 | None, 585 | Token, 586 | OAuth 587 | }; 588 | 589 | /** \brief Client secret/Api key */ 590 | String token; 591 | /** \brief Client id of your API credential */ 592 | String clientID; 593 | /** \brief The client secret */ 594 | String clientSecret; 595 | /** \brief The access token */ 596 | String accessToken; 597 | /** \brief The refresh token */ 598 | String refreshToken; 599 | /** \brief The header for all the requests*/ 600 | String header; 601 | /** \brief The authentication type*/ 602 | Authorization auth; 603 | 604 | 605 | public: 606 | 607 | /** 608 | * \fn FreesoundClient::FreesoundClient(); 609 | * 610 | * \brief Empty construtctor 611 | * 612 | * \author Antonio 613 | * \date 09/07/2019 614 | */ 615 | 616 | FreesoundClient(); 617 | 618 | 619 | /** 620 | * \fn FreesoundClient::FreesoundClient(String secret); 621 | * 622 | * \brief Constructor for token based authorization 623 | * 624 | * \author Antonio 625 | * \date 09/07/2019 626 | * 627 | * \param secret The client secret. 628 | */ 629 | 630 | FreesoundClient(String secret); 631 | 632 | /** 633 | * \fn FreesoundClient::FreesoundClient(String id, String secret); 634 | * 635 | * \brief Constructor for OAuth2 authorization 636 | * 637 | * \author Antonio 638 | * \date 09/07/2019 639 | * 640 | * \param id The client ID. 641 | * \param secret The client secret. 642 | */ 643 | 644 | FreesoundClient(String id, String secret); 645 | 646 | /** 647 | * \fn void FreesoundClient::authenticationOnBrowser(int mode=0, Callback cb = [] {}); 648 | * 649 | * \brief Performs the first step of the authorization on the browser 650 | * 651 | * \author Antonio 652 | * \date 09/07/2019 653 | * 654 | * \param mode (Optional) The login mode 0 = logout and authorize, 1 = authorize. 655 | * \param cb (Optional) The callback function called in the end of the function. 656 | */ 657 | 658 | void authenticationOnBrowser(int mode=0, Callback cb = [] {}); 659 | 660 | /** 661 | * \fn void FreesoundClient::exchangeToken(String authCode, Callback cb = [] {}); 662 | * 663 | * \brief Exchange token is the 3rd step of the authorization proccess, where the 664 | * authorization code is exchanged for an access token 665 | * 666 | * \author Antonio 667 | * \date 09/07/2019 668 | * 669 | * \param authCode The authentication code. 670 | * \param cb (Optional) The callback function called in the end of the function. 671 | */ 672 | 673 | void exchangeToken(String authCode, Callback cb = [] {}); 674 | 675 | /** 676 | * \fn void FreesoundClient::refreshAccessToken(Callback cb = [] {}); 677 | * 678 | * \brief Function for refreshing the access token, which expires in 24h 679 | * 680 | * \author Antonio 681 | * \date 09/07/2019 682 | * 683 | * \param cb (Optional) The callback function called in the end of the function. 684 | */ 685 | 686 | void refreshAccessToken(Callback cb = [] {}); 687 | 688 | /** 689 | * \fn SoundList FreesoundClient::textSearch(String query, String filter=String(), String sort="score", int groupByPack=0, int page=-1, int pageSize=-1, String fields = String(), String descriptors = String(), int normalized=0); 690 | * 691 | * \brief This resource allows searching sounds in Freesound by matching their tags and other kinds of metadata. 692 | * 693 | * \author Antonio 694 | * \date 09/07/2019 695 | * 696 | * \param query The text query. 697 | * \param filter (Optional) Allows filtering query results. 698 | * \param sort (Optional) Indicates how query results should be sorted. 699 | * \param groupByPack (Optional) This parameter represents a boolean option to indicate whether to group packs 700 | * in a single result 701 | * \param page (Optional) Query results are paginated, this parameter indicates what page should be returned. 702 | * \param pageSize (Optional) Indicates the number of sounds per page to include in the result. 703 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 704 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 705 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 706 | * 707 | * \returns A SoundList with the text search results. 708 | */ 709 | 710 | SoundList textSearch(String query, String filter=String(), String sort="score", int groupByPack=0, int page=-1, int pageSize=-1, String fields = String(), String descriptors = String(), int normalized=0); 711 | 712 | /** 713 | * \fn SoundList FreesoundClient::contentSearch(String target, String descriptorsFilter=String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 714 | * 715 | * \brief Content search 716 | * 717 | * \author Antonio 718 | * \date 09/07/2019 719 | * 720 | * \param target Target for the content search. 721 | * \param descriptorsFilter (Optional) This parameter allows filtering query results by values of the content-based descriptors. 722 | * \param page (Optional) Query results are paginated, this parameter indicates what page should be returned. 723 | * \param pageSize (Optional) Indicates the number of sounds per page to include in the result. 724 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 725 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 726 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 727 | * 728 | * \returns A SoundList with the content search results. 729 | */ 730 | 731 | SoundList contentSearch(String target, String descriptorsFilter=String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 732 | 733 | /** 734 | * \fn FSList FreesoundClient::fetchNextPage(FSList fslist); 735 | * 736 | * \brief Gets the next page of a SoundList 737 | * 738 | * \author Antonio 739 | * \date 09/07/2019 740 | * 741 | * \param FSList Next page of results. 742 | * 743 | * \returns The next page of results. 744 | */ 745 | 746 | FSList fetchNextPage(FSList fslist); 747 | 748 | /** 749 | * \fn FSList FreesoundClient::fetchPreviousPage(FSList fslist); 750 | * 751 | * \brief Gets the previous page of a FSList 752 | * \author Antonio 753 | * \date 09/07/2019 754 | * 755 | * \param FSList Previous page of results. 756 | * 757 | * \returns The previous page of results. 758 | */ 759 | 760 | FSList fetchPreviousPage(FSList fslist); 761 | 762 | /** 763 | * \fn SoundList FreesoundClient::fetchNextPage(SoundList fslist); 764 | * 765 | * \brief Gets the next page of a SoundList 766 | * 767 | * \author Antonio 768 | * \date 09/07/2019 769 | * 770 | * \param SoundList Next page of results. 771 | * 772 | * \returns The next page of results. 773 | */ 774 | 775 | SoundList fetchNextPage(SoundList fslist); 776 | 777 | /** 778 | * \fn SoundList FreesoundClient::fetchPreviousPage(SoundList fslist); 779 | * 780 | * \brief Gets the previous page of a SoundList 781 | * 782 | * \author Antonio 783 | * \date 09/07/2019 784 | * 785 | * \param SoundList Previous page of results. 786 | * 787 | * \returns The next page of results. 788 | */ 789 | 790 | SoundList fetchPreviousPage(SoundList fslist); 791 | 792 | /** 793 | * \fn FSSound FreesoundClient::getSound(String id); 794 | * 795 | * \brief Gets a sound instance from its id 796 | * 797 | * \author Antonio 798 | * \date 09/07/2019 799 | * 800 | * \param id The sound’s unique identifier. 801 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 802 | * 803 | * \returns A FSSound instance. 804 | */ 805 | 806 | FSSound getSound(String id, String fields = String()); 807 | 808 | /** 809 | * \fn var FreesoundClient::getSoundAnalysis(String id, String descriptors = String(), int normalized = 0); 810 | * 811 | * \brief Retrieves of analysis information (content-based descriptors) of a sound. 812 | * 813 | * \author Antonio 814 | * \date 09/07/2019 815 | * 816 | * \param id The sound’s unique identifier. 817 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 818 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 819 | * 820 | * \returns A var dictionary containing the results of the analysis 821 | */ 822 | 823 | var getSoundAnalysis(String id, String descriptors = String(), int normalized = 0); 824 | 825 | /** 826 | * \fn SoundList FreesoundClient::getSimilarSounds(String id, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 827 | * 828 | * \brief This resource allows the retrieval of sounds similar to the given sound target 829 | * 830 | * \author Antonio 831 | * \date 09/07/2019 832 | * 833 | * \param id The id of the target sound. 834 | * \param descriptorsFilter (Optional) This parameter allows filtering query results by values of the content-based descriptors. 835 | * \param page (Optional) Query results are paginated, this parameter indicates what page should be returned. 836 | * \param pageSize (Optional) Indicates the number of sounds per page to include in the result. 837 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 838 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 839 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 840 | * 841 | * \returns A SoundList with the sounds similar to a target. 842 | */ 843 | 844 | SoundList getSimilarSounds(String id, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 845 | 846 | /** 847 | * \fn URL::DownloadTask* FreesoundClient::downloadSound(FSSound sound, const File &location, URL::DownloadTask::Listener * listener = nullptr); 848 | * 849 | * \brief This resource allows you to download a sound in its original format/quality 850 | * 851 | * \author Antonio 852 | * \date 09/07/2019 853 | * 854 | * \param sound The sound to be downloaded. 855 | * \param location The location for the sound to be download. 856 | * \param [in,out] listener (Optional) If non-null, the listener for the download progress. 857 | * 858 | * \returns Null if it fails, else a pointer to an URL::DownloadTask. 859 | */ 860 | 861 | URL::DownloadTask* downloadSound(FSSound sound, const File &location, URL::DownloadTask::Listener * listener = nullptr); 862 | 863 | /** 864 | * \fn URL::DownloadTask* FreesoundClient::downloadOGGSoundPreview(FSSound sound, const File &location, URL::DownloadTask::Listener * listener = nullptr); 865 | * 866 | * \brief This resource allows you to download the preview of a sound in OGG format. The advantage of downloading a preview instead of the original file is that the file size is lower and the format is unified. 867 | * 868 | * \author Frederic 869 | * \date 12/09/2019 870 | * 871 | * \param sound The sound whose preview should be downloaded. 872 | * \param location The location for the sound to be download. 873 | * \param [in,out] listener (Optional) If non-null, the listener for the download progress. 874 | * 875 | * \returns Null if it fails, else a pointer to an URL::DownloadTask. 876 | */ 877 | 878 | URL::DownloadTask* downloadOGGSoundPreview(FSSound sound, const File &location, URL::DownloadTask::Listener * listener = nullptr); 879 | 880 | URL::DownloadTask* downloadMP3SoundPreview(FSSound sound, const File &location, URL::DownloadTask::Listener * listener = nullptr); 881 | 882 | 883 | /** 884 | * \fn int FreesoundClient::uploadSound(const File &fileToUpload, String tags, String description, String name = String(), String license = "Creative Commons 0", String pack = String(), String geotag = String(), Callback cb = [] {}); 885 | * 886 | * \brief Uploads a sound to Freesound 887 | * 888 | * \author Antonio 889 | * \date 09/07/2019 890 | * 891 | * \param fileToUpload The file to upload. 892 | * \param tags The tags that will be assigned to the sound. Separate tags with spaces and join multi-words with dashes (e.g. “tag1 tag2 tag3 cool-tag4”). 893 | * \param description A textual description of the sound. 894 | * \param name (Optional) The name that will be given to the sound. If not provided, filename will be used. 895 | * \param license (Optional) The license of the sound. Must be either “Attribution”, “Attribution Noncommercial” or “Creative Commons 0”. 896 | * \param pack (Optional) The name of the pack where the sound should be included. 897 | * \param geotag (Optional) Geotag information for the sound. 898 | * \param cb (Optional) The callback function called in the end of the function. 899 | * 900 | * \returns The id of the uploaded sound. 901 | */ 902 | 903 | int uploadSound(const File &fileToUpload, String tags, String description, String name = String(), String license = "Creative Commons 0", String pack = String(), String geotag = String(), Callback cb = [] {}); 904 | 905 | /** 906 | * \fn int FreesoundClient::describeSound(String uploadFilename, String description, String license, String name = String(), String tags = String(), String pack = String(), String geotag = String() ); 907 | * 908 | * \brief Describe sound 909 | * 910 | * \author Antonio 911 | * \date 09/07/2019 912 | * 913 | * \param uploadFilename The filename of the sound to describe. 914 | * \param description A textual description of the sound. 915 | * \param license The license of the sound. Must be either “Attribution”, “Attribution Noncommercial” or “Creative Commons 0”. 916 | * \param name (Optional) The name that will be given to the sound. If not provided, filename will be used. 917 | * \param tags (Optional) The tags that will be assigned to the sound. Separate tags with spaces and join multi-words with dashes (e.g. “tag1 tag2 tag3 cool-tag4”). 918 | * \param pack (Optional) The name of the pack where the sound should be included. 919 | * \param geotag (Optional) Geotag information for the sound. 920 | * 921 | * \returns An int. 922 | */ 923 | 924 | int describeSound(String uploadFilename, String description, String license, String name = String(), String tags = String(), String pack = String(), String geotag = String() ); 925 | 926 | /** 927 | * \fn var FreesoundClient::pendingUploads(); 928 | * 929 | * \brief This resource allows you to retrieve a list of audio files uploaded by the Freesound user logged in using OAuth2 that have not yet been described, processed or moderated 930 | * 931 | * \author Antonio 932 | * \date 09/07/2019 933 | * 934 | * \returns A dictionary with a list of audio files uploaded by the Freesound user. 935 | */ 936 | 937 | var pendingUploads(); 938 | 939 | /** 940 | * \fn void FreesoundClient::editSoundDescription(String id, String name = String(), String tags = String(), String description = String(), String license = String(), String pack = String(), String geotag = String(), Callback cb = [] {}); 941 | * 942 | * \brief Edit sound description 943 | * 944 | * \author Antonio 945 | * \date 09/07/2019 946 | * 947 | * \param id The identifier of the sound. 948 | * \param name (Optional) The new name that will be given to the sound. 949 | * \param tags (Optional) The new tags that will be assigned to the sound. 950 | * \param description (Optional) The new textual description for the sound. 951 | * \param license (Optional) The new license of the sound. Must be either “Attribution”, “Attribution Noncommercial” or “Creative Commons 0”. 952 | * \param pack (Optional) The new name of the pack where the sound should be included. 953 | * \param geotag (Optional) The new geotag information for the sound. 954 | * \param cb (Optional) The callback function called in the end of the function. 955 | */ 956 | 957 | void editSoundDescription(String id, String name = String(), String tags = String(), String description = String(), String license = String(), String pack = String(), String geotag = String(), Callback cb = [] {}); 958 | 959 | /** 960 | * \fn void FreesoundClient::bookmarkSound(String id, String name = String(), String category = String(), Callback cb = [] {}); 961 | * 962 | * \brief This resource allows you to bookmark an existing sound. 963 | * 964 | * \author Antonio 965 | * \date 09/07/2019 966 | * 967 | * \param id The sound identifier. 968 | * \param name (Optional) The new name that will be given to the bookmark 969 | * \param category (Optional) The name of the category under the bookmark will be classified. 970 | * \param cb (Optional) The callback function called in the end of the function. 971 | */ 972 | 973 | void bookmarkSound(String id, String name = String(), String category = String(), Callback cb = [] {}); 974 | 975 | /** 976 | * \fn void FreesoundClient::rateSound(String id, int rating, Callback cb = [] {}); 977 | * 978 | * \brief This resource allows you to rate an existing sound. 979 | * 980 | * \author Antonio 981 | * \date 09/07/2019 982 | * 983 | * \param id The sound identifier. 984 | * \param rating Integer between 0 and 5 (both included) representing the rating for the sound. 985 | * \param cb (Optional) The callback function called in the end of the function. 986 | */ 987 | 988 | void rateSound(String id, int rating, Callback cb = [] {}); 989 | 990 | /** 991 | * \fn void FreesoundClient::commentSound(String id, String comment, Callback cb = [] {}); 992 | * 993 | * \brief This resource allows you to post a comment to an existing sound. 994 | * 995 | * \author Antonio 996 | * \date 09/07/2019 997 | * 998 | * \param id The sound identifier. 999 | * \param comment Comment for the sound. 1000 | * \param cb (Optional) The callback function called in the end of the function. 1001 | */ 1002 | 1003 | void commentSound(String id, String comment, Callback cb = [] {}); 1004 | 1005 | /** 1006 | * \fn FSUser FreesoundClient::getUser(String user); 1007 | * 1008 | * \brief This resource allows the retrieval of information about a particular Freesound user 1009 | * 1010 | * \author Antonio 1011 | * \date 09/07/2019 1012 | * 1013 | * \param user The username of the user. 1014 | * 1015 | * \returns A FSUser instance of the user requested. 1016 | */ 1017 | 1018 | FSUser getUser(String user); 1019 | 1020 | /** 1021 | * \fn SoundList FreesoundClient::getUserSounds(String username, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 1022 | * 1023 | * \brief This resource allows the retrieval of a list of sounds uploaded by a particular Freesound user. 1024 | * 1025 | * \author Antonio 1026 | * \date 09/07/2019 1027 | * 1028 | * \param username The username of the user. 1029 | * \param descriptorsFilter (Optional) This parameter allows filtering query results by values of the content-based descriptors. 1030 | * \param page (Optional) Query results are paginated, this parameter indicates what page should be returned. 1031 | * \param pageSize (Optional) Indicates the number of sounds per page to include in the result. 1032 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 1033 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 1034 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 1035 | * 1036 | * \returns A SoundList with the user sounds. 1037 | */ 1038 | 1039 | SoundList getUserSounds(String username, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 1040 | 1041 | /** 1042 | * \fn FSList FreesoundClient::getUserBookmarkCategories(String username); 1043 | * 1044 | * \brief This resource allows the retrieval of a list of bookmark categories created by a particular Freesound user. 1045 | * 1046 | * \author Antonio 1047 | * \date 09/07/2019 1048 | * 1049 | * \param username The username of the user. 1050 | * 1051 | * \returns A FSList with the user bookmark categories. 1052 | */ 1053 | 1054 | FSList getUserBookmarkCategories(String username); 1055 | 1056 | /** 1057 | * \fn FSList FreesoundClient::getUserBookmarkCategoriesSounds(String username, String bookmarkCategory); 1058 | * 1059 | * \brief This resource allows the retrieval of a list of sounds from a bookmark category created by a particular Freesound user. 1060 | * 1061 | * \author Antonio 1062 | * \date 09/07/2019 1063 | * 1064 | * \param username The username of the user. 1065 | * \param bookmarkCategory The desired bookmark category. 1066 | * 1067 | * \returns A FSList with the user bookmark categories sounds. 1068 | */ 1069 | 1070 | FSList getUserBookmarkCategoriesSounds(String username, String bookmarkCategory); 1071 | 1072 | /** 1073 | * \fn FSList FreesoundClient::getUserPacks(String username); 1074 | * 1075 | * \brief This resource allows the retrieval of a list of packs created by a particular Freesound user. 1076 | * 1077 | * \author Antonio 1078 | * \date 09/07/2019 1079 | * 1080 | * \param username The username of the user. 1081 | * 1082 | * \returns A FSList with the user packs. 1083 | */ 1084 | 1085 | FSList getUserPacks(String username); 1086 | 1087 | /** 1088 | * \fn FSPack FreesoundClient::getPack(String id); 1089 | * 1090 | * \brief This resource allows the retrieval of a list of packs created by a particular Freesound user. 1091 | * 1092 | * \author Antonio 1093 | * \date 09/07/2019 1094 | * 1095 | * \param id The username of the user. 1096 | * 1097 | * \returns A FSList with the user packs. 1098 | */ 1099 | 1100 | FSPack getPack(String id); 1101 | 1102 | /** 1103 | * \fn SoundList FreesoundClient::getPackSounds(String id, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 1104 | * 1105 | * \brief This resource allows the retrieval of information about a pack. 1106 | * 1107 | * \author Antonio 1108 | * \date 09/07/2019 1109 | * 1110 | * \param id The identifier of the pack. 1111 | * \param descriptorsFilter (Optional) This parameter allows filtering query results by values of the content-based descriptors. 1112 | * \param page (Optional) Query results are paginated, this parameter indicates what page should be returned. 1113 | * \param pageSize (Optional) Indicates the number of sounds per page to include in the result. 1114 | * \param fields (Optional) Indicates which sound properties should be included in every sound of the response. 1115 | * \param descriptors (Optional) Indicates which sound content-based descriptors should be included in every sound of the response. 1116 | * \param normalized (Optional) Indicates whether the returned sound content-based descriptors should be normalized or not. 1117 | * 1118 | * \returns A FSPack instance of the desired pack 1119 | */ 1120 | 1121 | SoundList getPackSounds(String id, String descriptorsFilter = String(), int page = -1, int pageSize = -1, String fields = String(), String descriptors = String(), int normalized = 0); 1122 | 1123 | /** 1124 | * \fn URL::DownloadTask* FreesoundClient::downloadPack(FSPack pack, const File &location, URL::DownloadTask::Listener * listener = nullptr); 1125 | * 1126 | * \brief This resource allows you to download all the sounds of a pack in a single zip file. 1127 | * 1128 | * \author Antonio 1129 | * \date 09/07/2019 1130 | * 1131 | * \param pack The desored pack. 1132 | * \param location The location fpr the download. 1133 | * \param [in,out] listener (Optional) If non-null, the download task listener. 1134 | * 1135 | * \returns Null if it fails, else a pointer to the URL::DownloadTask. 1136 | */ 1137 | 1138 | URL::DownloadTask* downloadPack(FSPack pack, const File &location, URL::DownloadTask::Listener * listener = nullptr); 1139 | 1140 | /** 1141 | * \fn FSUser FreesoundClient::getMe(); 1142 | * 1143 | * \brief Returnes a FSUser instance of the authenticated user 1144 | * 1145 | * \author Antonio 1146 | * \date 09/07/2019 1147 | * 1148 | * \returns FSUser instance of the authenticated user. 1149 | */ 1150 | 1151 | FSUser getMe(); 1152 | 1153 | /** 1154 | * \fn bool FreesoundClient::isTokenNotEmpty(); 1155 | * 1156 | * \brief Queries if the token is not empty 1157 | * 1158 | * \author Antonio 1159 | * \date 09/07/2019 1160 | * 1161 | * \returns False if the token is empty, True if not. 1162 | */ 1163 | 1164 | bool isTokenNotEmpty(); 1165 | 1166 | /** 1167 | * \fn String FreesoundClient::getToken(); 1168 | * 1169 | * \brief Gets the authentication token 1170 | * 1171 | * \author Antonio 1172 | * \date 09/07/2019 1173 | * 1174 | * \returns The authentication token. 1175 | */ 1176 | 1177 | String getToken(); 1178 | 1179 | /** 1180 | * \fn String FreesoundClient::getHeader(); 1181 | * 1182 | * \brief Gets the authentication header 1183 | * 1184 | * \author Antonio 1185 | * \date 09/07/2019 1186 | * 1187 | * \returns The authentication header. 1188 | */ 1189 | 1190 | String getHeader(); 1191 | 1192 | /** 1193 | * \fn String FreesoundClient::getClientID(); 1194 | * 1195 | * \brief Gets client identifier 1196 | * 1197 | * \author Antonio 1198 | * \date 09/07/2019 1199 | * 1200 | * \returns The client identifier. 1201 | */ 1202 | 1203 | String getClientID(); 1204 | 1205 | 1206 | }; 1207 | 1208 | /** 1209 | * \class FreesoundClientComponent 1210 | * 1211 | * \brief A freesound client component for use in GUI. 1212 | * 1213 | * \author Antonio 1214 | * \date 09/07/2019 1215 | */ 1216 | 1217 | class FreesoundClientComponent : public FreesoundClient, public WebBrowserComponent { 1218 | private: 1219 | /** \brief The authentication code */ 1220 | String authCode; 1221 | public: 1222 | 1223 | /** 1224 | * \fn void FreesoundClientComponent::startAuthentication(int mode = 0); 1225 | * 1226 | * \brief Starts the authentication 1227 | * 1228 | * \author Antonio 1229 | * \date 09/07/2019 1230 | * 1231 | * \param mode (Optional) The mode, 0 for logout and authorize, 1 for authorize only. 1232 | */ 1233 | 1234 | void startAuthentication(int mode = 0); 1235 | 1236 | /** 1237 | * \fn void FreesoundClientComponent::pageFinishedLoading(const String & url, Callback authCallback = [] {}); 1238 | * 1239 | * \brief Called when the authentication page finished loading 1240 | * 1241 | * \author Antonio 1242 | * \date 09/07/2019 1243 | * 1244 | * \param url URL of the page. 1245 | * \param authCallback (Optional) The authentication finished callback. 1246 | */ 1247 | 1248 | void pageFinishedLoading(const String & url, Callback authCallback = [] {}); 1249 | 1250 | /** 1251 | * \fn void FreesoundClientComponent::pageLoadHadNetworkError(); 1252 | * 1253 | * \brief Called when loading the page didn't go as expected 1254 | * 1255 | * \author Antonio 1256 | * \date 09/07/2019 1257 | */ 1258 | 1259 | void pageLoadHadNetworkError(); 1260 | 1261 | }; 1262 | 1263 | /** 1264 | * \class FSRequest 1265 | * 1266 | * \brief A class which represents a request to Freesound. 1267 | * 1268 | * \author Antonio 1269 | * \date 09/07/2019 1270 | */ 1271 | 1272 | class FSRequest { 1273 | public: 1274 | 1275 | /** 1276 | * \fn FSRequest::FSRequest(URL uriToRequest, FreesoundClient clientToUse) 1277 | * 1278 | * \brief The constructor for a request 1279 | * 1280 | * \author Antonio 1281 | * \date 09/07/2019 1282 | * 1283 | * \param uriToRequest The URL for the request. 1284 | * \param clientToUse The FSClient to use. 1285 | */ 1286 | 1287 | FSRequest(URL uriToRequest, FreesoundClient clientToUse) 1288 | :client(clientToUse), 1289 | uri(uriToRequest) 1290 | {} 1291 | 1292 | /** 1293 | * \fn Response FSRequest::request(StringPairArray params = StringPairArray(), String data = String(), bool postLikeRequest = true); 1294 | * 1295 | * \brief Make a request to FreesoundAPI 1296 | * 1297 | * \author Antonio 1298 | * \date 09/07/2019 1299 | * 1300 | * \param params (Optional) The parameters for the request. 1301 | * \param data (Optional) The data if any. 1302 | * \param postLikeRequest (Optional) If a POST like request is desired. 1303 | * 1304 | * \returns The response for the request. 1305 | */ 1306 | 1307 | Response request(StringPairArray params = StringPairArray(), String data = String(), bool postLikeRequest = true); 1308 | 1309 | private: 1310 | /** \brief The URI of the rrequest */ 1311 | URL uri; 1312 | /** \brief The client used*/ 1313 | FreesoundClient& client; 1314 | }; 1315 | 1316 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/FreesoundSearchComponent.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | FreesoundSearchComponent.h 5 | Created: 10 Sep 2019 5:44:51pm 6 | Author: Frederic Font Corbera 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "../JuceLibraryCode/JuceHeader.h" 14 | #include "PluginProcessor.h" 15 | #include "api_key.h" 16 | 17 | 18 | class ResultsTableComponent : public Component, public TableListBoxModel { 19 | public: 20 | ResultsTableComponent() { 21 | 22 | table.setModel(this); 23 | 24 | addAndMakeVisible (table); 25 | 26 | table.getHeader().addColumn("Name", 1, 200, 50, 1000, (TableHeaderComponent::visible | TableHeaderComponent::resizable )); 27 | table.getHeader().addColumn("Author", 2, 100, 50, 1000, (TableHeaderComponent::visible | TableHeaderComponent::resizable )); 28 | table.getHeader().addColumn("License", 3, 400, 50, 1000, (TableHeaderComponent::visible | TableHeaderComponent::resizable )); 29 | } 30 | 31 | int getNumRows() override { 32 | return (int)data.size(); 33 | } 34 | 35 | void paintRowBackground (Graphics& g, int rowNumber, int /*width*/, int /*height*/, bool rowIsSelected) override 36 | { 37 | auto alternateColour = getLookAndFeel().findColour (ListBox::backgroundColourId) 38 | .interpolatedWith (getLookAndFeel().findColour (ListBox::textColourId), 0.03f); 39 | g.fillAll (alternateColour); 40 | } 41 | 42 | void paintCell (Graphics& g, int rowNumber, int columnId, 43 | int width, int height, bool rowIsSelected) override 44 | { 45 | g.setColour (getLookAndFeel().findColour (ListBox::textColourId)); 46 | auto text = data[rowNumber].getReference(columnId - 1); 47 | g.drawText (text, 2, 0, width - 4, height, Justification::centredLeft, true); 48 | g.setColour (getLookAndFeel().findColour (ListBox::backgroundColourId)); 49 | g.fillRect (width - 1, 0, 1, height); 50 | } 51 | 52 | void addRowData(const StringArray itemsStringArray) { 53 | data.push_back(itemsStringArray); 54 | } 55 | 56 | void updateContent() { 57 | table.updateContent(); 58 | table.repaint(); 59 | } 60 | 61 | void clearItems() { 62 | data.clear(); 63 | } 64 | 65 | void resized() override { 66 | table.setBounds(getLocalBounds()); 67 | } 68 | 69 | void cellClicked(int rowNumber, int columnId, const MouseEvent &) { 70 | processor->addToMidiBuffer(rowNumber * 8); 71 | } 72 | 73 | void setProcessor(FreesoundSimpleSamplerAudioProcessor* p) 74 | { 75 | processor = p; 76 | if (p->isArrayNotEmpty()) { 77 | data = p->getData(); 78 | updateContent(); 79 | } 80 | } 81 | 82 | std::vector getData() { 83 | return data; 84 | } 85 | 86 | private: 87 | TableListBox table; 88 | std::vector data; 89 | FreesoundSimpleSamplerAudioProcessor * processor; 90 | }; 91 | 92 | 93 | class FreesoundSearchComponent: public Component, 94 | public Button::Listener 95 | { 96 | public: 97 | 98 | FreesoundSearchComponent () 99 | { 100 | searchInput.setText("", dontSendNotification); 101 | searchInput.setColour (Label::backgroundColourId, getLookAndFeel().findColour (ResizableWindow::backgroundColourId).brighter()); 102 | searchInput.setEditable (true); 103 | addAndMakeVisible (searchInput); 104 | 105 | searchButton.addListener (this); 106 | searchButton.setButtonText("Go!"); 107 | addAndMakeVisible (searchButton); 108 | 109 | addAndMakeVisible (searchResults); 110 | } 111 | 112 | ~FreesoundSearchComponent () 113 | { 114 | } 115 | 116 | void setProcessor (FreesoundSimpleSamplerAudioProcessor* p) 117 | { 118 | processor = p; 119 | searchResults.setProcessor(p); 120 | searchInput.setText(p->getQuery(), dontSendNotification); 121 | } 122 | 123 | void paint (Graphics& g) override 124 | { 125 | } 126 | 127 | void resized () override 128 | { 129 | float unitMargin = 10; 130 | float searchButtonWidth = 100; 131 | float inputHeight = 20; 132 | 133 | searchInput.setBounds(0, 0, getWidth() - unitMargin - searchButtonWidth, inputHeight); 134 | searchButton.setBounds(getWidth() - searchButtonWidth, 0, searchButtonWidth, inputHeight); 135 | searchResults.setBounds(0, inputHeight + unitMargin, getWidth(), getHeight() - (inputHeight + unitMargin)); 136 | } 137 | 138 | void buttonClicked (Button* button) override 139 | { 140 | if (button == &searchButton) 141 | { 142 | Array sounds = searchSounds(); 143 | 144 | processor->newSoundsReady(sounds, searchInput.getText(true), searchResults.getData()); 145 | } 146 | } 147 | 148 | Array searchSounds () 149 | { 150 | // Makes a query to Freesound to retrieve short sounds using the query text from searchInput label 151 | // Sorts the results randomly and chooses the first 16 to be automatically assinged to the pads 152 | 153 | String query = searchInput.getText(true); 154 | FreesoundClient client(FREESOUND_API_KEY); 155 | SoundList list = client.textSearch(query, "duration:[0 TO 0.5]", "score", 1, -1, 150, "id,name,username,license,previews"); 156 | Array sounds = list.toArrayOfSounds(); 157 | std::random_shuffle(sounds.begin(), sounds.end()); 158 | sounds.resize(16); 159 | 160 | // Update results table 161 | searchResults.clearItems(); 162 | for (int i=0; i& buffer, MidiBuffer& midiMessages) 151 | { 152 | midiMessages.addEvents(midiFromEditor, 0, INT_MAX, 0); 153 | midiFromEditor.clear(); 154 | sampler.renderNextBlock(buffer, midiMessages, 0, buffer.getNumSamples()); 155 | midiMessages.clear(); 156 | 157 | } 158 | 159 | //============================================================================== 160 | bool FreesoundSimpleSamplerAudioProcessor::hasEditor() const 161 | { 162 | return true; // (change this to false if you choose to not supply an editor) 163 | } 164 | 165 | AudioProcessorEditor* FreesoundSimpleSamplerAudioProcessor::createEditor() 166 | { 167 | return new FreesoundSimpleSamplerAudioProcessorEditor (*this); 168 | } 169 | 170 | //============================================================================== 171 | void FreesoundSimpleSamplerAudioProcessor::getStateInformation (MemoryBlock& destData) 172 | { 173 | // You should use this method to store your parameters in the memory block. 174 | // You could do that either as raw data, or use the XML or ValueTree classes 175 | // as intermediaries to make it easy to save and load complex data. 176 | } 177 | 178 | void FreesoundSimpleSamplerAudioProcessor::setStateInformation (const void* data, int sizeInBytes) 179 | { 180 | // You should use this method to restore your parameters from this memory block, 181 | // whose contents will have been created by the getStateInformation() call. 182 | } 183 | 184 | //============================================================================== 185 | void FreesoundSimpleSamplerAudioProcessor::newSoundsReady (Array sounds, String textQuery, std::vector soundInfo) 186 | { 187 | // This method is called by the FreesoundSearchComponent when a new query has 188 | // been made and new sounda have been selected for loading into the sampler. 189 | // This methods downloads the sounds, sotres in tmp directory and... 190 | 191 | // Download the sounds 192 | 193 | std::cout << "Downloading new sounds" << std::endl; 194 | FreesoundClient client(FREESOUND_API_KEY); 195 | for (int i=0; i files = tmpDownloadLocation.findChildFiles(2, false); 221 | for (int i = 0; i < files.size(); i++) { 222 | std::unique_ptr reader(audioFormatManager.createReaderFor(files[i])); 223 | BigInteger notes; 224 | notes.setRange(i * 8, i * 8 + 7, true); 225 | sampler.addSound(new SamplerSound(String(i), *reader, notes, i*8, 0, maxLength, maxLength)); 226 | //reader.release(); 227 | } 228 | 229 | 230 | } 231 | 232 | void FreesoundSimpleSamplerAudioProcessor::addToMidiBuffer(int notenumber) 233 | { 234 | 235 | MidiMessage message = MidiMessage::noteOn(10, notenumber, (uint8)100); 236 | double timestamp = Time::getMillisecondCounterHiRes() * 0.001 - getStartTime(); 237 | message.setTimeStamp(timestamp); 238 | 239 | auto sampleNumber = (int)(timestamp * getSampleRate()); 240 | 241 | midiFromEditor.addEvent(message,sampleNumber); 242 | 243 | //auto messageOff = MidiMessage::noteOff(message.getChannel(), message.getNoteNumber()); 244 | //messageOff.setTimeStamp(Time::getMillisecondCounterHiRes() * 0.001 - startTime); 245 | //midiFromEditor.addEvent(messageOff,sampleNumber+1); 246 | 247 | } 248 | 249 | double FreesoundSimpleSamplerAudioProcessor::getStartTime(){ 250 | return startTime; 251 | } 252 | 253 | bool FreesoundSimpleSamplerAudioProcessor::isArrayNotEmpty() 254 | { 255 | return soundsArray.size() != 0; 256 | } 257 | 258 | String FreesoundSimpleSamplerAudioProcessor::getQuery() 259 | { 260 | return query; 261 | } 262 | 263 | std::vector FreesoundSimpleSamplerAudioProcessor::getData() 264 | { 265 | 266 | return soundsArray; 267 | } 268 | 269 | //============================================================================== 270 | // This creates new instances of the plugin.. 271 | AudioProcessor* JUCE_CALLTYPE createPluginFilter() 272 | { 273 | return new FreesoundSimpleSamplerAudioProcessor(); 274 | } 275 | 276 | 277 | 278 | 279 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/PluginProcessor.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | This file was auto-generated! 5 | 6 | It contains the basic framework code for a JUCE plugin processor. 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #include "../JuceLibraryCode/JuceHeader.h" 14 | #include "FreesoundAPI.h" 15 | 16 | //============================================================================== 17 | /** 18 | */ 19 | 20 | 21 | 22 | 23 | class FreesoundSimpleSamplerAudioProcessor : public AudioProcessor 24 | { 25 | public: 26 | //============================================================================== 27 | FreesoundSimpleSamplerAudioProcessor(); 28 | ~FreesoundSimpleSamplerAudioProcessor(); 29 | 30 | //============================================================================== 31 | void prepareToPlay (double sampleRate, int samplesPerBlock) override; 32 | void releaseResources() override; 33 | 34 | #ifndef JucePlugin_PreferredChannelConfigurations 35 | bool isBusesLayoutSupported (const BusesLayout& layouts) const override; 36 | #endif 37 | 38 | void processBlock (AudioBuffer&, MidiBuffer&) override; 39 | 40 | //============================================================================== 41 | AudioProcessorEditor* createEditor() override; 42 | bool hasEditor() const override; 43 | 44 | //============================================================================== 45 | const String getName() const override; 46 | 47 | bool acceptsMidi() const override; 48 | bool producesMidi() const override; 49 | bool isMidiEffect() const override; 50 | double getTailLengthSeconds() const override; 51 | 52 | //============================================================================== 53 | int getNumPrograms() override; 54 | int getCurrentProgram() override; 55 | void setCurrentProgram (int index) override; 56 | const String getProgramName (int index) override; 57 | void changeProgramName (int index, const String& newName) override; 58 | 59 | //============================================================================== 60 | void getStateInformation (MemoryBlock& destData) override; 61 | void setStateInformation (const void* data, int sizeInBytes) override; 62 | 63 | //============================================================================== 64 | File tmpDownloadLocation; 65 | void newSoundsReady(Array sounds, String textQuery, std::vector soundInfo); 66 | 67 | void setSources(); 68 | void addToMidiBuffer(int notenumber); 69 | 70 | double getStartTime(); 71 | bool isArrayNotEmpty(); 72 | String getQuery(); 73 | std::vector getData(); 74 | 75 | 76 | private: 77 | 78 | std::vector downloadTasksToDelete; 79 | Synthesiser sampler; 80 | AudioFormatManager audioFormatManager; 81 | MidiBuffer midiFromEditor; 82 | long midicounter; 83 | double startTime; 84 | String query; 85 | std::vector soundsArray; 86 | 87 | 88 | //============================================================================== 89 | JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (FreesoundSimpleSamplerAudioProcessor) 90 | }; 91 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/api_key.example.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | api_key.h 5 | Created: 10 Sep 2019 5:48:01pm 6 | Author: Frederic Font Corbera 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #define FREESOUND_API_KEY "YOUR_API_KEY_HERE" 14 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/Source/defines.h: -------------------------------------------------------------------------------- 1 | /* 2 | ============================================================================== 3 | 4 | defines.h 5 | Created: 10 Sep 2019 5:47:12pm 6 | Author: Frederic Font Corbera 7 | 8 | ============================================================================== 9 | */ 10 | 11 | #pragma once 12 | 13 | #define VERSION "0.1" 14 | -------------------------------------------------------------------------------- /FreesoundSimpleSampler/debug.filtergraph: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 0. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 0. 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 39 | 0. 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 54 | 191.VMjLgXK....O+fWarAhckI2bo8la8HRLt.iHfTlai8FYo41Y8HRUTYTK3HxO9.BOVMEUy.Ea0cVZtMEcgQWY9vSRC8Vav8lak4Fc9XCLt3hKt3hKt3hKt3hYRUUSTEETIckVwTjQisVTTgkdEYjKAQjYPQSPWgUdMcjKAQjct3hdA4hKt3hKt3hKtnTUv.UQAslXuk0UXoWUFE0YQcEV77RRC8Vav8lak4Fc9vyKVMEUy.Ea0cVZtMEcgQWY9.. 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-ff69b4.svg)](http://www.gnu.org/licenses/agpl-3.0) 2 | 3 | # FreesoundSimpleSampler 4 | A simple JUCE sampler plugin which demonstrates the use of the freesound-juce API client. The user can create a textual query to Freesound.org and 16 random sounds are loaded in a sampler. 5 | 6 | Usage 7 | ------- 8 | 9 | To use this application, the user should execute it either as a standalone application or as a plugin in a Digital Audio Workstation. Then, the following steps should be performed: 10 | * Enter a search query in the text box. 11 | * Press the "Go!" button. 12 | * The sounds can be triggered by pressing the sound in the list or by sending the corresponding MIDI note. The sounds use the full range of MIDI notes, with the first sounds in C0, and subsequent sounds 8 semitones apart (C0, G#0, E1, C2, G#2, E3, C4, G#4, E5, etc.). 13 | 14 | The user interface of this application is shown below for easy referencing. 15 | 16 | ![FreesoundSimpleSamplerUI](FreesoundSimpleSampler.PNG "User interface of the FreesoundSimpleSampler") 17 | 18 | 19 | Installation 20 | ------- 21 | 22 | In order to install Freesound Uploader, the JUCE framework should be downloaded, installed and setup. A tutorial on how to do this is available in https://docs.juce.com/master/tutorial_new_projucer_project.html 23 | Firstly, the "Getting Started" section should be performed. Then, the FreesoundSimpleSampler.juce file should be opened with the projucer. 24 | 25 | Before building it you should duplicate the file `FreesoundSimpleSampler/Source/api_key.example.h`, request a Freesound API key and add it to that file, and rename it to `FreesoundSimpleSampler/Source/api_key.h`. 26 | 27 | The final step is setting up the desired plugin export formats in the Projucer project settings and, finally you should open this project on the desired Juce exporter and build the solution. 28 | In case a VST2 build of the plugin is desired, a VST2 SDK should be provided and linked in the Projucer global paths. 29 | 30 | Authors 31 | ------- 32 | António Ramires 33 | antonio.ramires@upf.edu 34 | 35 | Frederic Font 36 | frederic.font@upf.edu 37 | --------------------------------------------------------------------------------