Welcome to my voice diary app!
Use this app in conjunction with <a href="https://vocaroo.com/">vocaroo.com</a> to record your voice.
To add a new entry in your voice diary, paste the recording ID found in the vocaroo share URL. (Example: if the share URL is voca.ro/103xZGdQgu0S/, then you should use the ID 103xZGdQgu0S.)
For each entry, select a rating for each vocal feature. How closely do you feel this recording represents the way you would like to use that particular feature in your ideal voice?
You can add new vocal features on the Settings tab. You can also use checkboxes control whether they appear on the Add Entry page. (Hiding a feature from this page will not remove it from any recordings you have already rated.)<!-- Use array concatenation to add more features to the standard list. http://www.motoslave.net/sugarcube/2/docs/#methods-array-prototype-method-concat -->
Enable/disable features:
<br/>
<<for _i, _feature range $featuresList>>
<<capture _i, _feature>>
<<if _feature.standard == true>>
<label><<checkbox "$featuresList[_i].active" false true autocheck>> _feature.name</label> <br/>
<</if>>
<</capture>>
<</for>>
<<if $featuresList.some(e => e.standard === false)>>
Custom features:
<br/>
<<for _i, _feature range $featuresList>>
<<capture _i, _feature>>
<<if _feature.standard == false>>
<label><<checkbox "$featuresList[_i].active" false true autocheck>> _feature.name</label> <br/>
<</if>>
<</capture>>
<</for>>
<</if>>
<br/>
Add a new feature:
<br/>
<<textbox "_newFeature" "">>
<<link [[Add|Settings]] >>
<<set $featuresList = $featuresList.concat([{name: _newFeature, active: true, standard: false}])>>
<</link>><!-
http://www.motoslave.net/sugarcube/2/docs/#special-passage-storyinterface
-->
<div id="interface">
<div id = "menu" data-passage = "Menu"></div>
<div id = "passages"></div>
</div>
</div>[[Home]] - [[Add Entry]] - [[View All]] - [[Settings]]
-------''Vocaroo ID:'' <<textbox "_vocarooID" "">>
<br><br>
''Name this recording:'' <<textbox "_entryTitle" "Voice Entry">>
<br><br>
<<set _entryRatings = {}>>
<<for _i, _feature range $featuresList>>
<<capture _i, _feature>>
<<if _feature.active is true>>
''_feature.name:''
<<for _j to 1; _j lte 5; _j++>>
_j <<radiobutton `"_entryRatings." + _feature.name` _j>>
<</for>>
<br/>
<</if>>
<</capture>>
<</for>>
<<link [[Save|Confirm Entry]]>>
<<set _now = new Date()>>
<<set $entryList = $entryList.concat([
{
id:_vocarooID,
date: _now,
title: _entryTitle,
ratings: _entryRatings,
favorite: false
}
] )>>
<</link>><<set $featuresList = [
{name: "Resonance", active: true, standard:true},
{name: "Pitch", active: true, standard:true},
{name: "Breathiness", active: true, standard:true},
{name: "Articulation", active: true, standard:true},
{name: "Speed", active: false, standard:true},
{name: "Volume", active: false, standard:true}
]>>
<<set $entryList = []>><<printEntry `$entryList[$entryList.length - 1]`>><<for _entry range $entryList>><<printEntry _entry>>
<</for>><<widget printEntry>>
<<set _entry = _args[0]>>
<<set _vocaroosrc = "https://vocaroo.com/embed/" + _entry.id + "?autoplay=0" >>
''_entry.title'' (_entry.date) <<if _entry.favorite == true>>🌟 <</if>>
<br/><br/>
''Ratings:''
<br/>
<<for _feature, _rating range _entry.ratings>>
  _feature: _rating <br/>
<</for>>
<iframe width="300" height="60" @src= _vocaroosrc frameborder="0" allow="autoplay"></iframe>
<</widget>>