/usr/share/doc/libjuce/apiref/classSamplerSound.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: SamplerSound Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="classSamplerSound-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SamplerSound Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A subclass of <a class="el" href="classSynthesiserSound.html" title="Describes one of the sounds that a Synthesiser can play. ">SynthesiserSound</a> that represents a sampled audio clip.
<a href="classSamplerSound.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for SamplerSound:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classSamplerSound.png" usemap="#SamplerSound_map" alt=""/>
<map id="SamplerSound_map" name="SamplerSound_map">
<area href="classSynthesiserSound.html" title="Describes one of the sounds that a Synthesiser can play. " alt="SynthesiserSound" shape="rect" coords="0,56,155,80"/>
<area href="classReferenceCountedObject.html" title="A base class which provides methods for reference-counting. " alt="ReferenceCountedObject" shape="rect" coords="0,0,155,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad26e044243f4802000b8dcbb6dd15cee"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#ad26e044243f4802000b8dcbb6dd15cee">SamplerSound</a> (const <a class="el" href="classString.html">String</a> &name, <a class="el" href="classAudioFormatReader.html">AudioFormatReader</a> &source, const <a class="el" href="classBigInteger.html">BigInteger</a> &midiNotes, int midiNoteForNormalPitch, double attackTimeSecs, double releaseTimeSecs, double maxSampleLengthSeconds)</td></tr>
<tr class="memdesc:ad26e044243f4802000b8dcbb6dd15cee"><td class="mdescLeft"> </td><td class="mdescRight">Creates a sampled sound from an audio reader. <a href="#ad26e044243f4802000b8dcbb6dd15cee">More...</a><br /></td></tr>
<tr class="separator:ad26e044243f4802000b8dcbb6dd15cee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4e5d644cede3dd9c821e40098da01945"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#a4e5d644cede3dd9c821e40098da01945">~SamplerSound</a> ()</td></tr>
<tr class="memdesc:a4e5d644cede3dd9c821e40098da01945"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a4e5d644cede3dd9c821e40098da01945">More...</a><br /></td></tr>
<tr class="separator:a4e5d644cede3dd9c821e40098da01945"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a12140b42cc5c7e0d4a73ae8763fc6df3"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classString.html">String</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#a12140b42cc5c7e0d4a73ae8763fc6df3">getName</a> () const noexcept</td></tr>
<tr class="memdesc:a12140b42cc5c7e0d4a73ae8763fc6df3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the sample's name. <a href="#a12140b42cc5c7e0d4a73ae8763fc6df3">More...</a><br /></td></tr>
<tr class="separator:a12140b42cc5c7e0d4a73ae8763fc6df3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa684e03887c9f213102ce7a0557e6f89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="juce__AudioSampleBuffer_8h.html#a97a2916214efbd76c6b870f9c48efba0">AudioSampleBuffer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#aa684e03887c9f213102ce7a0557e6f89">getAudioData</a> () const noexcept</td></tr>
<tr class="memdesc:aa684e03887c9f213102ce7a0557e6f89"><td class="mdescLeft"> </td><td class="mdescRight">Returns the audio sample data. <a href="#aa684e03887c9f213102ce7a0557e6f89">More...</a><br /></td></tr>
<tr class="separator:aa684e03887c9f213102ce7a0557e6f89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac579ceea6ee78e6dae8026b4b9b33038"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#ac579ceea6ee78e6dae8026b4b9b33038">appliesToNote</a> (int midiNoteNumber) override</td></tr>
<tr class="memdesc:ac579ceea6ee78e6dae8026b4b9b33038"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if this sound should be played when a given midi note is pressed. <a href="#ac579ceea6ee78e6dae8026b4b9b33038">More...</a><br /></td></tr>
<tr class="separator:ac579ceea6ee78e6dae8026b4b9b33038"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6f69ffcba849228995ab63d93439a339"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classSamplerSound.html#a6f69ffcba849228995ab63d93439a339">appliesToChannel</a> (int midiChannel) override</td></tr>
<tr class="memdesc:a6f69ffcba849228995ab63d93439a339"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the sound should be triggered by midi events on a given channel. <a href="#a6f69ffcba849228995ab63d93439a339">More...</a><br /></td></tr>
<tr class="separator:a6f69ffcba849228995ab63d93439a339"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classSynthesiserSound"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classSynthesiserSound')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classSynthesiserSound.html">SynthesiserSound</a></td></tr>
<tr class="memitem:a1565fcdfa4362d7b25c29178b4d39b76 inherit pub_methods_classSynthesiserSound"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classSynthesiserSound.html#a1565fcdfa4362d7b25c29178b4d39b76">~SynthesiserSound</a> ()</td></tr>
<tr class="memdesc:a1565fcdfa4362d7b25c29178b4d39b76 inherit pub_methods_classSynthesiserSound"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classSynthesiserSound.html#a1565fcdfa4362d7b25c29178b4d39b76">More...</a><br /></td></tr>
<tr class="separator:a1565fcdfa4362d7b25c29178b4d39b76 inherit pub_methods_classSynthesiserSound"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classReferenceCountedObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classReferenceCountedObject')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classReferenceCountedObject.html">ReferenceCountedObject</a></td></tr>
<tr class="memitem:a878ca594f89f757d29af5a42ee51161f inherit pub_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a878ca594f89f757d29af5a42ee51161f">incReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a878ca594f89f757d29af5a42ee51161f inherit pub_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Increments the object's reference count. <a href="classReferenceCountedObject.html#a878ca594f89f757d29af5a42ee51161f">More...</a><br /></td></tr>
<tr class="separator:a878ca594f89f757d29af5a42ee51161f inherit pub_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a523f06d996130f24b36996b28b83d802 inherit pub_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a523f06d996130f24b36996b28b83d802">decReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a523f06d996130f24b36996b28b83d802 inherit pub_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the object's reference count. <a href="classReferenceCountedObject.html#a523f06d996130f24b36996b28b83d802">More...</a><br /></td></tr>
<tr class="separator:a523f06d996130f24b36996b28b83d802 inherit pub_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2355316960a6bf2e9691fded43249254 inherit pub_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a2355316960a6bf2e9691fded43249254">decReferenceCountWithoutDeleting</a> () noexcept</td></tr>
<tr class="memdesc:a2355316960a6bf2e9691fded43249254 inherit pub_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the object's reference count. <a href="classReferenceCountedObject.html#a2355316960a6bf2e9691fded43249254">More...</a><br /></td></tr>
<tr class="separator:a2355316960a6bf2e9691fded43249254 inherit pub_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0111caf12d101fc74abd832d44fbfa4f inherit pub_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a0111caf12d101fc74abd832d44fbfa4f">getReferenceCount</a> () const noexcept</td></tr>
<tr class="memdesc:a0111caf12d101fc74abd832d44fbfa4f inherit pub_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Returns the object's current reference count. <a href="classReferenceCountedObject.html#a0111caf12d101fc74abd832d44fbfa4f">More...</a><br /></td></tr>
<tr class="separator:a0111caf12d101fc74abd832d44fbfa4f inherit pub_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classSynthesiserSound"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classSynthesiserSound')"><img src="closed.png" alt="-"/> Public Types inherited from <a class="el" href="classSynthesiserSound.html">SynthesiserSound</a></td></tr>
<tr class="memitem:a602e767cdfca63dd73df1f0d5c723ef8 inherit pub_types_classSynthesiserSound"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classReferenceCountedObjectPtr.html">ReferenceCountedObjectPtr</a>< <a class="el" href="classSynthesiserSound.html">SynthesiserSound</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classSynthesiserSound.html#a602e767cdfca63dd73df1f0d5c723ef8">Ptr</a></td></tr>
<tr class="memdesc:a602e767cdfca63dd73df1f0d5c723ef8 inherit pub_types_classSynthesiserSound"><td class="mdescLeft"> </td><td class="mdescRight">The class is reference-counted, so this is a handy pointer class for it. <a href="classSynthesiserSound.html#a602e767cdfca63dd73df1f0d5c723ef8">More...</a><br /></td></tr>
<tr class="separator:a602e767cdfca63dd73df1f0d5c723ef8 inherit pub_types_classSynthesiserSound"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_methods_classSynthesiserSound"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classSynthesiserSound')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classSynthesiserSound.html">SynthesiserSound</a></td></tr>
<tr class="memitem:a7446eb4d78aa0ce2dcd37ca1ff48dd3a inherit pro_methods_classSynthesiserSound"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classSynthesiserSound.html#a7446eb4d78aa0ce2dcd37ca1ff48dd3a">SynthesiserSound</a> ()</td></tr>
<tr class="separator:a7446eb4d78aa0ce2dcd37ca1ff48dd3a inherit pro_methods_classSynthesiserSound"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_methods_classReferenceCountedObject"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classReferenceCountedObject')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classReferenceCountedObject.html">ReferenceCountedObject</a></td></tr>
<tr class="memitem:a86c1a0791cb6e98e63f7c1f7812c6eb5 inherit pro_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a86c1a0791cb6e98e63f7c1f7812c6eb5">ReferenceCountedObject</a> ()</td></tr>
<tr class="memdesc:a86c1a0791cb6e98e63f7c1f7812c6eb5 inherit pro_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Creates the reference-counted object (with an initial ref count of zero). <a href="classReferenceCountedObject.html#a86c1a0791cb6e98e63f7c1f7812c6eb5">More...</a><br /></td></tr>
<tr class="separator:a86c1a0791cb6e98e63f7c1f7812c6eb5 inherit pro_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7ed87d7f91e5ae51c620947c61291375 inherit pro_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a7ed87d7f91e5ae51c620947c61291375">~ReferenceCountedObject</a> ()</td></tr>
<tr class="memdesc:a7ed87d7f91e5ae51c620947c61291375 inherit pro_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classReferenceCountedObject.html#a7ed87d7f91e5ae51c620947c61291375">More...</a><br /></td></tr>
<tr class="separator:a7ed87d7f91e5ae51c620947c61291375 inherit pro_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9bbeeab431755e2be8ff09dfe9ea4c4d inherit pro_methods_classReferenceCountedObject"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classReferenceCountedObject.html#a9bbeeab431755e2be8ff09dfe9ea4c4d">resetReferenceCount</a> () noexcept</td></tr>
<tr class="memdesc:a9bbeeab431755e2be8ff09dfe9ea4c4d inherit pro_methods_classReferenceCountedObject"><td class="mdescLeft"> </td><td class="mdescRight">Resets the reference count to zero without deleting the object. <a href="classReferenceCountedObject.html#a9bbeeab431755e2be8ff09dfe9ea4c4d">More...</a><br /></td></tr>
<tr class="separator:a9bbeeab431755e2be8ff09dfe9ea4c4d inherit pro_methods_classReferenceCountedObject"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A subclass of <a class="el" href="classSynthesiserSound.html" title="Describes one of the sounds that a Synthesiser can play. ">SynthesiserSound</a> that represents a sampled audio clip. </p>
<p>This is a pretty basic sampler, and just attempts to load the whole audio stream into memory.</p>
<p>To use it, create a <a class="el" href="classSynthesiser.html" title="Base class for a musical device that can play sounds. ">Synthesiser</a>, add some <a class="el" href="classSamplerVoice.html" title="A subclass of SynthesiserVoice that can play a SamplerSound. ">SamplerVoice</a> objects to it, then give it some SampledSound objects to play.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classSamplerVoice.html" title="A subclass of SynthesiserVoice that can play a SamplerSound. ">SamplerVoice</a>, <a class="el" href="classSynthesiser.html" title="Base class for a musical device that can play sounds. ">Synthesiser</a>, <a class="el" href="classSynthesiserSound.html" title="Describes one of the sounds that a Synthesiser can play. ">SynthesiserSound</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="ad26e044243f4802000b8dcbb6dd15cee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad26e044243f4802000b8dcbb6dd15cee">§ </a></span>SamplerSound()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SamplerSound::SamplerSound </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classAudioFormatReader.html">AudioFormatReader</a> & </td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classBigInteger.html">BigInteger</a> & </td>
<td class="paramname"><em>midiNotes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>midiNoteForNormalPitch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>attackTimeSecs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>releaseTimeSecs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>maxSampleLengthSeconds</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a sampled sound from an audio reader. </p>
<p>This will attempt to load the audio from the source into memory and store it in this object.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">name</td><td>a name for the sample </td></tr>
<tr><td class="paramname">source</td><td>the audio to load. This object can be safely deleted by the caller after this constructor returns </td></tr>
<tr><td class="paramname">midiNotes</td><td>the set of midi keys that this sound should be played on. This is used by the <a class="el" href="classSynthesiserSound.html#abc192aba46964c8539206db1e6f6f747" title="Returns true if this sound should be played when a given midi note is pressed. ">SynthesiserSound::appliesToNote()</a> method </td></tr>
<tr><td class="paramname">midiNoteForNormalPitch</td><td>the midi note at which the sample should be played with its natural rate. All other notes will be pitched up or down relative to this one </td></tr>
<tr><td class="paramname">attackTimeSecs</td><td>the attack (fade-in) time, in seconds </td></tr>
<tr><td class="paramname">releaseTimeSecs</td><td>the decay (fade-out) time, in seconds </td></tr>
<tr><td class="paramname">maxSampleLengthSeconds</td><td>a maximum length of audio to read from the audio source, in seconds </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4e5d644cede3dd9c821e40098da01945"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e5d644cede3dd9c821e40098da01945">§ </a></span>~SamplerSound()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SamplerSound::~SamplerSound </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a12140b42cc5c7e0d4a73ae8763fc6df3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a12140b42cc5c7e0d4a73ae8763fc6df3">§ </a></span>getName()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classString.html">String</a>& SamplerSound::getName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the sample's name. </p>
</div>
</div>
<a id="aa684e03887c9f213102ce7a0557e6f89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa684e03887c9f213102ce7a0557e6f89">§ </a></span>getAudioData()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="juce__AudioSampleBuffer_8h.html#a97a2916214efbd76c6b870f9c48efba0">AudioSampleBuffer</a>* SamplerSound::getAudioData </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the audio sample data. </p>
<p>This could return nullptr if there was a problem loading the data. </p>
<p>References <a class="el" href="classSynthesiserSound.html#a3910c5fd83df051b05925bbddf4960cd">SynthesiserSound::appliesToChannel()</a>, and <a class="el" href="classSynthesiserSound.html#abc192aba46964c8539206db1e6f6f747">SynthesiserSound::appliesToNote()</a>.</p>
</div>
</div>
<a id="ac579ceea6ee78e6dae8026b4b9b33038"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac579ceea6ee78e6dae8026b4b9b33038">§ </a></span>appliesToNote()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool SamplerSound::appliesToNote </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>midiNoteNumber</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if this sound should be played when a given midi note is pressed. </p>
<p>The <a class="el" href="classSynthesiser.html" title="Base class for a musical device that can play sounds. ">Synthesiser</a> will use this information when deciding which sounds to trigger for a given note. </p>
<p>Implements <a class="el" href="classSynthesiserSound.html#abc192aba46964c8539206db1e6f6f747">SynthesiserSound</a>.</p>
</div>
</div>
<a id="a6f69ffcba849228995ab63d93439a339"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f69ffcba849228995ab63d93439a339">§ </a></span>appliesToChannel()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool SamplerSound::appliesToChannel </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>midiChannel</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if the sound should be triggered by midi events on a given channel. </p>
<p>The <a class="el" href="classSynthesiser.html" title="Base class for a musical device that can play sounds. ">Synthesiser</a> will use this information when deciding which sounds to trigger for a given note. </p>
<p>Implements <a class="el" href="classSynthesiserSound.html#a3910c5fd83df051b05925bbddf4960cd">SynthesiserSound</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__Sampler_8h.html">juce_Sampler.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|