Yeld is based on the Yearn protocol, optimized to take you further.
Features a vastly improved yield generation system that rewards YELD token holders even after they have finished staking their stablecoins.
Implements the new Buy and Burn system and the exclusive Retirement Yield, among other unseen protocols.
See
INFO for more details.
Rewarding token holders daily
even if they aren't staking tokens.
In traditional yield farming applications the users are rewarded from automatic portfolio rebalancing systems by updating daily each users' assets to buy the highest APY every day. In manifold.finance not only you get the best APY every day but you get rewarded for your YELD token holdings even after you've finished staking.
Strategies
You start by depositing as many stablecoins as you want to stake on the system. Suppose on the first day your DAI holdings are generating a 17% APY on Aave. When that APY innevitably drops, say on day 5, your porfolio will be rebalanced by moving those DAI using a Smart Contract to the highest performer of that day which could be Compound or similar exactly at 12am CEST. Initially we will support dYdX, Aave, Uniswap, Compound and Curve.fi. The contract is self-controlling meaning it automatically detects the APY changes and updates users portfolios.
Whenever you generate yield from staking your stablecoins, you automatically generate YELD tokens. Daily 100 YELD tokens will be distributed to yield farmers depending on how much profit they have created. This extra YELD farm will last for the initial 100 days. That amount is increased 10x for the first 3 days after the app is live. So if the total daily yield is 60,000 USD worth of stablecoins and your tokens generated 500 USD in yield, you'll get a 0.83% of the 100 YELD distributed daily, 0.83 YELD tokens in a single day. Or 8.3 for the first 3 days.
Algorithms
We use a new Buy and Burn algorithm where we split the daily yield generated by users in half to automatically buy ETH and exchange it for YELD tokens on Uniswap. Then, those YELD tokens are burned to reduce the total supply. When that happens, token holders will see an inmediate increase in YELD value to supplement their investments since a smaller supply increases the price.
While normal supply reducing systems burn tokens to reduce the supply and wait for the market to self-adjust after several token exchanges, our Buy and Burn system directly updates the price right away since the purchased tokens modify the pair balance ratio on Uniswap. Resulting in a price increase, instantly.
The result is an extremely efficient yield economy that rebalances and updates prices minute by minute without requiring user intervention.The most advanced type of yield farming to benefit users above all.
A 1% of the total yield is taken and distributed to Retirement Yield farmers, explained below.
Retirement Yield
Our largest goal is to reward token holders even after they are done staking and they've extracted their tokens from the dApp. The way we do it is simple: if user A has staked any stablecoins in the dApp for at least 1 day, he'll benefit from a lifetime of rewards paid in ETH. User A will become a Retirement Yield Farmer.
How much the user gets depends entirely on his daily holdings. The larger percentage of the total supply you hold, the more you earn every day based on the daily yield profits from the collective farmers. We call this system The Retirement Yield.
Compared to traditional yield farming systems, you don't need to lock your tokens permanentely in the system to keep earning.
You get rewarded for being a holder every day regardless of whether you're staking or not. Furthemore, holders benefit from price increases from our Buy and Burn system.
Technicals
Total supply:
60,000 YELD
30,000 tokens sold on the token sale.
20,000 YELD tokens
locked for daily rewards
on
Uniswap.
The remaining
YELD will be made available for governance, development, auditing and other use cases.
For more information check Yeld's
Discord
Codebase
Our contracts will be modified from the yearn finance contracts to implement our innovative Buy and Burn system, Retirement Yield algorithm and token redistribution systems. Available once audited to increase your safety.


This is a splash, shown during loading (bundled with the "anim" extension).
Getting started with deck.js:
anim extension
use right arrow to move on
Nested deck.js slides
- Not an extension (in core deck.js)
- Just have an element with the “slide” class…
- … and it will appear (hit the right arrow now)
- Hey! I appeared! (go on)
- The gray-ish style is part of the theme
Show/Hide Elements
- Go beyond sequential appearance … like this!
- … for example
- Or hide stuff
- Let's get the title back, slowly :)
Add/Remove Classes
- We can also add/remove classes: like “highlight”
- This is highlight by default (styled with css)
- We can add a class
- And remove it
Class for the Container
- We can also add/remove classes to the container: like “red”
- Next will make it red
- Next will remove it
- NB: this is an alternative to container-styling
Attribute Animations
- We can animate any attribute, like the color
- Let's try
- Or the size
- Or play multiple animations, and with delays
Video Control
- Starts paused
- Plays on "next"
- Then pauses on "next"
- Then next slide
More Animations for SVG
- Some animations are specific to SVG
- SVG = Scalar Vector Graphics = your schemas :)
- See the svg extension demo
The “anim” extension
- Works in conjunction with
- “events”: extension that triggers events
(notify the slide when it becomes current)
- “step”: extension that also trigger init events
(knowing about toplevel vs nested slides)
- Uses open attributes "data-*" (see source)
- Adds animation classes
- anim-show/hide, anim-addclass/removeclass,
- anim-attribute, anim-play, anim-pause, …
/


September 7, 2017
August 18, 2015
July 1, 2015
December 3, 2014
November 10, 2014
August 13, 2014
August 2014
July 7, 2014
August 12, 2013
May 4, 2013


Sign up
First Name
Last Name
Email Address
Must be a valid email address.
Password
Your password must be at least 6 characters as well as contain at least one uppercase, one lowercase, and one number.
Confirm Password
Log in
First Name
Last Name
Password


Contact
INFO: 065/555 555
Maria Trandafila Square 14
21000 Novi Sad
SERVICES
Sales Image
Painting Exhibition
Rent Space
Gallery
MORE LOCATION
Branka Bajica 20, Beograd
Djordje Sevickog 52, Nis
Stanoje Galavasa 36, Zrenjanin
Petra Kocica 18, Novi Sad


Abigail Cabunoc Mayes is the lead developer
for the Mozilla Science
Lab, an open science initiative of the Mozilla Foundation.
Prior to joining Mozilla, Abby worked as a software developer at
the Ontario Institute for Cancer Research where she was the
technical lead on the WormBase website.
Maintainer: Using Databases and SQL


Penne Vodka
Margherita Pizza
Pesto Tomato Pasta
Garlic and Rosemary Chicken
Baked Garlic Parmesan Chicken
Chicken Fajitas
Strawberry Cheesecake Stuffed Cupcakes
Banana Pudding Poke Cake
Easy Cherry Crumb Bars
Profile
Favorites
Home
My Orders
Cart


Your browser does not support the
audio
element.
Save (enter)
Carry on (arrow-right)
Owl
Bat
Mammal
Dog
Other_animal
Mystery
Migrant (m)
Migrant-low
Wander (w)
Local_individual (l)
Local_choir (ö)
Faint (f)
Strong (g)
Ignore
Distortion2
Buzz
High-pass
Faded
Silence (i)
Single_noise (n)
Human_speech
Loud_plane
Loud_vehicle
Noise
Rain (r)
Wind (y)
Loud_rain
Loud_wind
Keywords:


Radio button can be used for single selection. All of the radio buttons under the same "name" attribute are part of the same group and only one of them can be selected at a time.


The members of AIAA range from math to civil engineering majors. The club takes pride in this diversity as it brings different ways of thinking and knowledge to our clubs competitions and research. If there was one charactersitic that puts a UNL-AIAA Student Chapter member above everyone else it would be charismatic dedication.


Index Placeholder
This will be Anakaris' Page
This Will Be Aulbath's Page
This Will Be Bishamon's Page
This Will Be Buletta's Page
This Will Be Demitri's Page
This Will Be Felicia's Page
This Will Be Gallon's Page
This Will Be Jedah's Page
This Will Be Lei-Lei's Page
This Will Be Lilith's Page
This Will Be Morrigan's Page
This Will Be Q-Bee's Page
This Will Be Sasquatch's Page
This Will Be Victor's Page
This Will Be Zabel's Page
Real Index Screen Test Page


Vendor Name:
DGB CONSULTING
Reference Number:
4500250137
Contract Date:
2010-17-12
Description of Work:
Training consultants
Contract Period:
2010-17-12 to 2011-01-11
Delivery Date:
2011-01-11
Original Contract Value:
$0.00
Current Contract Value:
$42,943.89
Comments:
Competitively sourced


Alarm Clock
问题描述 :
Advanced courses in computer science often include many interesting optimization problems. The following optimization problem is not advanced, nor is it particularly interesting. You are to write a program to determine the minimum number of buttons a person must push to set their alarm clock. Assume the alarm clock has 7 buttons � hour-up, hour-down, tens-minute-up, and tens-minute-down, ones-minute-up, ones-minute-down, and am/pm. For example, continuously pushing the hour-up button will cause hour digit to go through the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, …. Pushing the hour-down button will cause the sequence to go in the reverse order. Pushing the tens-minute-up buttons cycles tens minute digit through the numbers 0, 1, 2, 3, 4, 5, 0, 1, … Pushing the ones-minute-up button cycles the one digit through the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, … Pushing the am/pm button causes toggles the am/pm indicator.
输入:
The first line of input will contain an integer indicating the number of problems that need to be processed. Each line will contain two times � the first one the current time and the second one the desired time. All times will have the format: 1 or 2-digit hour; followed by a colon; followed by a 2-digit minute; followed by “am” or “pm”. A single space will separate the two times.
输出:
The first line of input will contain an integer indicating the number of problems that need to be processed. Each line will contain two times � the first one the current time and the second one the desired time. All times will have the format: 1 or 2-digit hour; followed by a colon; followed by a 2-digit minute; followed by “am” or “pm”. A single space will separate the two times.
样例输入:
6 7:30am 7:30am 7:30am 7:33am 7:30am 7:20am 7:30am 7:27am 7:30am 7:30pm 7:10am 7:50am
样例输出:
Going from 7:30am to 7:30am requires 0 pushes. Going from 7:30am to 7:33am requires 3 pushes. Going from 7:30am to 7:20am requires 1 push. Going from 7:30am to 7:27am requires 4 pushes. Going from 7:30am to 7:30pm requires 1 push. Going from 7:10am to 7:50am requires 2 pushes.
/* hdu 2395 Alarm Clock 这题太水了 上下午 与 小时不关联 小时 与 分的十位不关联 分的十位 与 个位不关联 */ #include<iostream> #include<string> #include<sstream> using namespace std; int cha(int a,int b,int mod) { int ret=1000; if(b-a>0&&b-a<ret) { ret=b-a; } if(a-b>0&&a-b<ret) { ret=a-b; } if(a+mod-b>0&&a+mod-b<ret) { ret=a+mod-b; } if(b+mod-a>0&&b+mod-a<ret) { ret=b+mod-a;//仅为了之前的 键盘误 ret=a+mod-b; } return ret; } int main() { int t,ret; int h1,h2,m1,m2,n1,n2; char p1,p2; string s1,s2; cin>>t; while(t--) { ret=0; cin>>s1>>s2; stringstream strs; strs.str(s1); strs>>h1; strs.get(); m1=strs.get()-'0'; n1=strs.get()-'0'; p1=strs.get(); strs.str(s2); strs>>h2; strs.get(); m2=strs.get()-'0'; n2=strs.get()-'0'; p2=strs.get(); if(p1!=p2) ++ret; if(h1!=h2) { ret+=cha(h1,h2,12); } if(m1!=m2) { ret+=cha(m1,m2,6); } if(n1!=n2) { ret+=cha(n1,n2,10); } cout<<"Going from "<<s1<<" to "<<s2<<" requires "<<ret<<((ret==1)?" push.":" pushes.")<<endl; } return 0; }
解题转自：http://blog.csdn.net/qq172108805/article/details/8777619
(adsbygoogle = window.adsbygoogle || []).push({});
刚开始学习，为啥会报错了
Thank you very much
给力
<EMAIL_ADDRESS>第一句可以忽略不计了吧。从第二句开始分析，说明这个花色下的所有牌都会在其它里面出现，那么还剩下♠和♦。第三句，可以排除2和7，因为在两种花色里有。现在是第四句，因为♠还剩下多个，只有是♦B才能知道答案。
很好的思路，可以借鉴
等待后面的实现，多谢
方法4中使用hash表，只要用出现次数作为Value，就可以解决重复元素的问题了。
嗯 分析得很到位，确实用模板编程能让面试官对你的印象更好。在设置辅助栈的时候可以这样：push时，比较要push的elem和辅助栈的栈顶，elem<=min.top()，则min.push(elem).否则只要push（elem）就好。在pop的时候，比较stack.top()与min.top(),if(stack.top()<=min.top()),则{stack.pop();min.pop();}，否则{stack.pop();}.
.net中char类型不是两个字节么
遍历了所有的情况(2^n)，tmp数组就是由当前遍历的状态s推算出的
remove没有实现
这道题目虽然简单，但是小编做的很到位，应该会给很多人启发吧！对于面试当中不给开辟额外空间的问题不是绝对的，实际上至少是允许少数变量存在的。之前遇到相似的问题也是恍然大悟，今天看到小编这篇文章相见恨晚。


Insert into clustering
Drag and drop the marker, and then, click to add it into the current clustering


Once upon a bad hair day a prince rode up rapunzel's way
From up above he heard her whine upset her hair had lost its shine
He thought her crying was a plea and sallied forth to set her free


Fibonacci Grid (?)
Fibonacci's found:
0
Show options
Hide options
Clear grid
Check sequence in:
Rows
Columns
Rows & columns
Check direction:
Left to right
Right to left
Both directions
Sequence size: (
0
)
Add random fibo sequences
Rows: (
0
)
Columns (
0
)
Make grid


In part 2 of this demonstration, we will once again initialize a client. Then we'll retrieve a model object by ID, retrieve a stream from the model, promote the model to a production state, add data to the strea, then ask Grok for predictions.
Please walk through the steps below.


WebMidi Class
The WebMidi
object makes it easier to work with the Web MIDI API. Basically, it simplifies
two things: sending and reacting upon receiving MIDI messages.
To send MIDI messages, you simply need to call the desired method (playNote()
,
sendPitchBend()
, stopNote()
, etc.) with the appropriate parameters and all the native MIDI
communication will be handled for you. The only additional thing that needs to be done is
enable WebMidi
. Here is an example:
WebMidi.enable(function() {
WebMidi.playNote("C3");
});
The code above, calls the WebMidi.enable()
method. Upon success, this method executes the
callback function specified as a parameter. In this case, the callback calls the playnote()
function to play a 3rd octave C on all devices and channels.
Receiving messages is just as easy. You simply have to set a callback function to be triggered when a specific MIDI message is received. For example, to listen for pitch bend events on any input MIDI channels:
WebMidi.addListener('pitchbend', function(e) {
console.log("Pitch value: " + e.value);
});
As you can see, this library makes it much easier to use the Web MIDI API. No need to manually craft or decode binary MIDI messages anymore!
Item Index
Methods
- _convertChannelToArray
- _convertNoteToArray
- _deselectRegisteredParameter static
- _initializeUserHandlers
- _onInterfaceStateChange
- _onMidiMessage
- _parseChannelEvent
- _parseSystemEvent
- _parseTimeParameter
- _selectNonRegisteredParameter static
- _selectRegisteredParameter static
- _setCurrentRegisteredParameter static
- addListener static
- enable static
- getDeviceById static
- getDeviceIndexById static
- guessNoteNumber static
- hasListener static
- noteNameToNumber static
- playNote static
- removeListener static
- send static
- sendActiveSensing static
- sendChannelAftertouch static
- sendChannelMode static
- sendClock static
- sendContinue static
- sendControlChange static
- sendKeyAftertouch static
- sendPitchBend static
- sendProgramChange static
- sendReset static
- sendSongPosition static
- sendSongSelect static
- sendStart static
- sendStop static
- sendSysex static
- sendTimecodeQuarterFrame static
- setMasterTuning static
- setModulationRange static
- setNonRegisteredParameter static
- setPitchBendRange static
- setRegisteredParameter static
- setTuningBank static
- setTuningProgram static
- stopNote static
Properties
Methods
_convertChannelToArray
-
[channel]
Converts an input value (which can be an int, an array or the value "all" to an array of valid
MIDI channels. If undefined
is provided as the channel, an array of all channels will be
returned.
Parameters:
-
[channel]
Uint | Array optional
_convertNoteToArray
-
[note]
Converts an input value (which can be an int, an array or the value "all" to an array of valid MIDI note numbers.
_deselectRegisteredParameter
-
output
-
channel
-
time
Deselects the currently active MIDI registered parameter so it is no longer affected by data entry, data increment and data decrement messages.
Current best practice recommends doing that after each call to
_setCurrentRegisteredParameter()
.
Returns:
_initializeUserHandlers
()
private
_onInterfaceStateChange
()
private
_onMidiMessage
()
private
_parseSystemEvent
()
private
_selectNonRegisteredParameter
-
parameter
-
output
-
channel
-
time
Selects a MIDI non-registered parameter so it is affected by data entry, data increment and data decrement messages.
Parameters:
Returns:
_selectRegisteredParameter
-
parameter
-
output
-
channel
-
time
Selects a MIDI registered parameter so it is affected by data entry, data increment and data decrement messages.
Parameters:
Returns:
_setCurrentRegisteredParameter
-
data
-
output
-
channel
-
time
Sets the value of the currently selected MIDI registered parameter.
Returns:
addListener
-
type
-
listener
-
[filters]
Adds an event listener that will trigger a function callback when the specified event happens.
By default, the listener is system-wide (it will listen on all MIDI channels of all MIDI input
devices). To listen to a specific device or channel, you can use the filter
parameter.
WebMidi must be enabled before adding event listeners.
Here is a list of events that are dispatched by the WebMidi
object and that can be listened
to.
MIDI interface event:
Device and channel-specific MIDI events:
System-wide MIDI events:
- sysex
- timecode
- songposition
- songselect
- tuningrequest
- clock
- start
- continue
- stop
- activesensing
- reset
- unknownsystemmessage
For system-wide events, the filters
parameter (if any) will be silently ignored.
Parameters:
-
type
StringThe type of the event.
-
listener
FunctionA callback function to execute when the specified event is detected. This function will receive an event parameter object. For details on this object's properties, check out the documentation for the various events (links above).
-
[filters]
Object optional-
[device="all"]
String | Array optionalThe id of the MIDI device to listen on. The device id can be retrieved in the
WebMidi.inputs
array. It is also possible to listen on several devices at once by passing in an array of ids. If set to 'all' (default) all devices will trigger the callback function. -
[input]
MIDIInput | Array(MIDIInput) optionalA MIDI input device or an array of MIDI input devices to listen to. As a reference, all available
MIDIInput
objects are listed in theWebMidi.inputs
array. When this parameter is left undefined, all input devices will trigger the callback function. -
[channel=all]
Uint | Array | String optionalThe MIDI channel to listen on (between 1 and 16). You can also specify an array of channels to listen on. If set to 'all', all channels will trigger the callback function.
-
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The 'listener' parameter must be a function.
enable
-
[successHandler]
-
[errorHandler]
-
[sysex=false]
Checks if the Web MIDI API is available and then tries to connect to the host's MIDI subsystem.
If the operation succeeds, the successHandler
callback is executed. If not, the
errorHandler
callback is executed and passed a string describing the error.
Parameters:
-
[successHandler]
Function optionalA function to execute upon success.
-
[errorHandler]
Function optionalA function to execute upon error. This function will be passed a string describing the error.
-
[sysex=false]
Boolean optionalWhether to enable sysex or not. When this parameter is set to true, the browser may prompt the user for authorization.
getDeviceById
-
id
-
[type=input]
Returns a MIDIOutput or MIDIInput device matching the specified id and device type.
Parameters:
Returns:
A MIDIOutput or MIDIInput device matching the specified
id. If no matching device can be found, the method returns false
.
getDeviceIndexById
-
id
-
[type=input]
Return the index of a device in the WebMidi.outputs
or WebMidi.inputs
arrays. The device
must be specified by using its id.
Parameters:
Returns:
If no matching device can be found, the method returns false
.
guessNoteNumber
-
input
Returns a valid MIDI note number given the specified input. The input can be an integer represented as a string, a note name (C3, F#4, D-2, G8, etc.), a float or an int between 0 and
Parameters:
-
input
ObjectA integer, float or string to extract the note number from.
Returns:
A valid MIDI note number (0-127).
Throws:
Invalid note number.
hasListener
-
type
-
listener
-
[filters]
Checks if the specified event type is already defined to trigger the listener function on the
specified device and channel. If more than one device and/or channel is specified, the function
will return true
only if all devices/channels have the listener defined.
For system-wide events (onstatechange
, sysex
, start
, etc.), the filters
parameter is
silently ignored.
Parameters:
-
type
StringThe type of the event.
-
listener
FunctionThe callback function to check for.
-
[filters]
Object optional{Object}
-
[input]
MIDIInput | Array(MIDIInput) optionalA MIDI input device or an array of MIDI input devices to check on. As a reference, all available
MIDIInput
objects are listed in theWebMidi.inputs
array. When this parameter is left undefined, all input devices will be checked. -
[channel=all]
Uint | Array | String optionalThe MIDI channel to check on. It can be a uint (between 1 and 16) or the special value "all".
-
Returns:
Boolean value indicating whether or not the channel(s) already have this listener defined.
Throws:
The 'listener' parameter must be a function.
noteNameToNumber
-
name
Returns a MIDI note number matching the note name passed in the form of a string parameter. The note name must include the octave number which should be between -2 and 8. The name can also optionally include a sharp "#" or double sharp "##" symbol and a flat "b" or double flat "bb" symbol: C5, G4, D#-1, F0, Gb7, Eb-1, Abb4, B##6, etc.
The lowest note is C-2 (MIDI note number 0) and the highest note is G8 (MIDI note number 127).
Parameters:
-
name
StringThe name of the note in the form of a letter, followed by an optional "#" or "b", followed by the octave number (between -2 and 8).
Returns:
The MIDI note number (between 0 and 127)
playNote
-
note
-
[velocity=0.5]
-
[duration=undefined]
-
[output]
-
[channel=all]
-
[time=undefined]
Requests the playback of a single note or multiple notes on the specified device(s) and
channel(s). You can delay the execution of the note on
command by using the delay
parameter
(milliseconds).
If no duration is specified, the note will play until a matching note off
is sent. If a
duration is specified, a note off
will be automatically executed after said duration.
Please note that if you do use a duration, the release velocity will always be 64. If you want
to tailor the release velocity, you need to use separate playNote()
and stopNote()
calls.
Parameters:
-
note
Array | Uint | StringThe note for which you are sending an aftertouch value. The notes can be specified in one of two ways. The first way is by using the MIDI note number (an integer between 0 and 127). The second way is by using the note name followed by the octave (C3, G#4, F-1, Db7). The octave range should be between -2 and 8. The lowest note is C-2 (MIDI note number 0) and the highest note is G8 (MIDI note number 127).
-
[velocity=0.5]
Number optionalThe velocity at which to play the note (between 0 and 1). An invalid velocity value will silently trigger the default.
-
[duration=undefined]
Int optionalThe number of milliseconds to wait before sending a matching note off event. If left undefined, only a
note on
message is sent. -
[output]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
removeListener
-
type
-
listener
-
[filters]
Removes the specified listener from all requested input devices and channel(s). If more than one devices and/or channels are specified, the function will remove the listener from all devices/channels.
For system-wide events (onstatechange
, sysex
, start
, etc.), the filters
parameter is
silently ignored.
Parameters:
-
type
StringThe type of the event.
-
listener
FunctionThe callback function to check for.
-
[filters]
Object optional{Object}
-
[input]
MIDIInput | Array(MIDIInput) optionalA MIDI input device or an array of MIDI input devices to remove from. As a reference, all available
MIDIInput
objects are listed in theWebMidi.inputs
array. When this parameter is left undefined, removal will occur for all input devices. -
[channel=all]
Uint | String optionalThe MIDI channel(s) to check on. It can be a uint (between 1 and 16) or the special value "all".
-
Returns:
The WebMidi
object for easy method chaining.
Throws:
WebMidi must be enabled before removing event listeners.
send
-
status
-
[data=[]]
-
[output]
-
[timestamp=0]
Sends a MIDI message to the specified MIDI output device(s) at the specified timestamp. The
output
parameter must refer to an actual available output device or an array of output
devices such as those listed in the WebMidi.outputs
array.
Unless, you are familiar with the details of the MIDI message format, you should not use this
method directly. Instead, use one of the simpler helper methods: playNote()
, stopNote()
,
sendControlChange()
, sendSystemMessage()
, etc.
Details on the format of MIDI messages are available in the summary of MIDI messages of the MIDI Manufacturers Association.
Parameters:
-
status
UintThe MIDI status byte of the message (128-255).
-
[data=[]]
Array(uint) optionalAn array of uints for the message. The number of data bytes varies depending on the status byte. It is perfectly legal to send no data. Each byte must be between 0 and 255.
-
[output]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available
MIDIOutput
objects are listed in theWebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[timestamp=0]
DOMHighResTimeStamp optionalThe timestamp at which to send the message. You can use
WebMidi.time
to retrieve the current timestamp. To send immediately, leave blank or use
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The data bytes must be integers between 0 (0x00) and 255 (0xFF).
sendActiveSensing
-
[output=undefined]
-
[time=undefined]
Sends an Active Sensing real-time message to the specified output device(s). This tells the remote device that the connection is still good. Active sensing messages should be sent every 300 ms if there was no other activity on the MIDI port.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendChannelAftertouch
-
[pressure=0.5]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a MIDI channel aftertouch
message to the specified device(s) and channel(s). For
key-specific aftertouch, you should instead use sendKeyAftertouch()
.
Parameters:
-
[pressure=0.5]
Number optionalThe pressure level (between 0 and 1). An invalid pressure value will silently trigger the default behaviour.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendChannelMode
-
command
-
value
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a MIDI channel mode
message to the specified device(s) and channel(s).
Parameters:
-
command
UintThe MIDI channel mode command (120-127).
-
value
UintThe value to send (0-127)
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
Value must be between 0 and 127.
sendClock
-
[output=undefined]
-
[time=undefined]
Sends a MIDI Clock real-time message to the specified output device(s). According to the standard, there are 24 MIDI Clocks for every quarter note.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendContinue
-
[output=undefined]
-
[time=undefined]
Sends a Continue real-time message to the specified output device(s). This resumes song
playback where it was previously stopped or where it was last cued with a song position
message. To start playback from the start, use the sendStart()
function.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendControlChange
-
controller
-
[value=0]
-
[output]
-
[channel=all]
-
[time=undefined]
Sends a MIDI control change
message to the specified device(s) and channel(s). The message
can also be scheduled to be sent at a specific time via the time
parameter.
To view a list of all available control change
messages, please consult "Table 3 - Control
Change Messages" from the MIDI Messages
specification.
Parameters:
-
controller
UintThe MIDI controller number (0-119)
-
[value=0]
Uint optionalThe value to send (0-127).
-
[output]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
Value must be between 0 and 127.
sendKeyAftertouch
-
note
-
[pressure=0.5]
-
[output]
-
[channel=all]
-
[time=undefined]
Sends a MIDI key aftertouch
message to the specified device(s) and channel(s). This is a
key-specific aftertouch. For a channel-wide aftertouch message, use
sendChannelAftertouch().
Parameters:
-
note
Array | Uint | StringThe note for which you are sending an aftertouch value. The notes can be specified in one of two ways. The first way is by using the MIDI note number (an integer between 0 and 127). The second way is by using the note name followed by the octave (C3, G#4, F-1, Db7). The octave range should be between -2 and 8. The lowest note is C-2 (MIDI note number 0) and the highest note is G8 (MIDI note number 127).
-
[pressure=0.5]
Number optionalThe pressure level to send (between 0 and 1).
-
[output]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The channel must be between 1 and 16.
sendPitchBend
-
bend
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a MIDI pitch bend
message to the specified device(s) and channel(s).
Parameters:
-
bend
NumberThe intensity level of the bend (between -1 and 1). A value of zero means no bend.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
Pitch bend value must be between -1 and 1.
sendProgramChange
-
program
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a MIDI program change
message to the specified device(s) and channel(s).
Parameters:
-
program
UintThe MIDI patch (program) number (0-127)
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
Program numbers must be between 0 and 127.
sendReset
-
[output=undefined]
-
[time=undefined]
Sends an Reset real-time message to the specified output device(s). This tells the remote device that is should reset itself to a default state.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendSongPosition
-
[value=0]
-
[output=undefined]
-
[time=undefined]
Sends a Song Position MIDI message to the specified output device(s). The value is expressed in MIDI beats (between 0 and 16383) which are 16th note. Position 0 is always the start of the song.
Parameters:
-
[value=0]
Uint optionalThe MIDI beat to cue to (int between 0 and 16383).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendSongSelect
-
value
-
[output=undefined]
-
[time=undefined]
Sends a Song Select MIDI message to the specified output device(s). Beware that some devices will display position 0 as position for user-friendlyness.
Parameters:
-
value
UintThe number of the song to select (int between 0 and 127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendStart
-
[output=undefined]
-
[time=undefined]
Sends a Start real-time message to the specified output device(s). A MIDI Start message
starts the playback of the current song at beat 0. To start playback elsewhere in the song, use
the sendContinue()
function.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendStop
-
[output=undefined]
-
[time=undefined]
Sends a Stop real-time message to the specified output device(s). This tells the remote device to stop playback immediately.
Parameters:
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendSysex
-
manufacturer
-
[data=[]]
-
[output=undefined]
-
[time=undefined]
Sends a MIDI system exclusive message to the specified device(s). The generated message will automatically be prepended with the SysEx byte (0xF0) and terminated with the End of SysEx byte (0xF7).
For example, if you want to send a SysEx message to a Korg device connected to the first output, you would use the following code:
WebMidi.sendSysex(0x42, [1, 2, 3, 4, 5], WebMidi.outputs[0]);
The above code sends the byte values 1, 2, 3, 4 and 5 to Korg devices (ID 0x42). Some manufacturers are identified using 3 bytes. In this case, you would use a 3-position array as the first parameter. For example, to send the same SysEx message to a Native Instruments device:
WebMidi.sendSysex([0x00, 0x21, 0x09], [1, 2, 3, 4, 5], WebMidi.outputs[0]);
There is no limit for the length of the data array. However, it is generally suggested to keep system exclusive messages to 64Kb or less.
Parameters:
-
manufacturer
Uint | ArrayA uint or an array of three uints between 0 and 127 that identify the targeted manufacturer. The MIDI Manufacturers Association maintains a full list of Manufacturer ID Numbers.
-
[data=[]]
Array optionalAn array of uints between 0 and 127. This is the data you wish to transfer.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
sendTimecodeQuarterFrame
-
value
-
[output=undefined]
-
[time=undefined]
Sends a MIDI Timecode Quarter Frame message to the specified output device(s). Please note that no processing is being done on the data. It is up to the developer to format the data according to the MIDI Timecode format.
Parameters:
-
value
UintThe quarter frame message content (unsigned int between 0 and 127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
setMasterTuning
-
[value=0.0]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a master tuning message to the specified output(s) and channel(s). The value is decimal and must be larger than -65 semitones and smaller than 64 semitones.
Because of the way the MIDI specification works, the decimal portion of the value will be encoded with a resolution of 14bit. The integer portion must be between -64 and 63 inclusively. For those familiar with the MIDI protocol, this function actually generates Master Coarse Tuning and Master Fine Tuning RPN messages.
Parameters:
-
[value=0.0]
Number optionalThe desired decimal adjustment value in semitones (-65 < x < 64)
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The value must be a decimal number between larger than -65 and smaller than 64.
setModulationRange
-
[semitones=0]
-
[cents=0]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a modulation depth range message to the specified output(s) and channel(s) so that they
adjust the depth of their modulation wheel's range. The range can be specified with the
semitones
parameter, the cents
parameter or by specifying both parameters at the same time.
Parameters:
-
[semitones=0]
Uint optionalThe desired adjustment value in semitones (0-127).
-
[cents=0]
Uint optionalThe desired adjustment value in cents (0-127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The cents value must be between 0 and 127.
setNonRegisteredParameter
-
parameter
-
[data=[]]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sets a non-registered parameter to the specified value. The NRPN is selected by passing in a two-position array specifying the values of the two control bytes. The value is specified by passing in an single integer (most cases) or an array of two integers.
NRPNs are not standardized in any way. Each manufacturer is free to implement them in any way they see fit. For example, according to the Roland GS specification, you can control the vibrato rate using NRPN (1, 8). Therefore, to set the vibrato rate value to 123 you would use:
WebMidi.setNonRegisteredParameter([1, 8], 123);
Obviously, you should select an output device and channel so the message is not sent to all channels on all devices. For instance, to send to channel 1 of the first device, you would use:
WebMidi.setNonRegisteredParameter([1, 8], 123, WebMidi.outputs[0], 1);
In some rarer cases, you need to send two values with your NRPN messages. In such cases, you would use a 2-position array. For example, for its ClockBPM parameter (2, 63), Novation uses a 14-bit value that combines an MSB and an LSB (7-bit values). So, for example, if the value to send was 10, you could use:
WebMidi.setNonRegisteredParameter([2, 63], [0, 10]);
For further implementation details, refer to the manufacturer's documentation.
Parameters:
-
parameter
String | ArrayA two-position array specifying the two control bytes (0x63, 0x62) that identify the non-registered parameter.
-
[data=[]]
Int | Array optionalAn integer or an array of integers with a length of 1 or 2 specifying the desired data.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
setPitchBendRange
-
[semitones=0]
-
[cents=0]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a pitch bend range message to the specified device(s) and channel(s) so that they adjust
the range used by their pitch bend lever. The range can be specified with the semitones
parameter, the cents
parameter or by specifying both parameters at the same time.
Parameters:
-
[semitones=0]
Uint optionalThe desired adjustment value in semitones (0-127). While nothing imposes that in the specification, it is very common for manufacturers to limit the range to 2 octaves (-12 semitones to 12 semitones).
-
[cents=0]
Uint optionalThe desired adjustment value in cents (0-127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The cents value must be between 0 and 127.
setRegisteredParameter
-
parameter
-
[data=[]]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sets the specified MIDI registered parameter to the desired value. The value is defined with up to two bytes of data that each can go from 0 to 127.
Unless you are very familiar with the MIDI standard you probably should favour one of the simpler to use functions such as:
setPitchbendRange()
,setModulationRange()
,setMasterTuning()
, etc.
MIDI registered parameters extend the original list of control change messages. Currently, there are only a limited number of them. Here are the original registered parameters with the identifier that can be used as the first parameter of this function:
- Pitchbend Range (0x00, 0x00):
pitchbendrange
- Channel Fine Tuning (0x00, 0x01):
channelfinetuning
- Channel Coarse Tuning (0x00, 0x02):
channelcoarsetuning
- Tuning Program (0x00, 0x03):
tuningprogram
- Tuning Bank (0x00, 0x04):
tuningbank
- Modulation Range (0x00, 0x05):
modulationrange
Note that the Tuning Program and Tuning Bank parameters are part of the MIDI Tuning Standard, which is not widely implemented.
Another set of extra parameters have been later added for 3D sound controllers. They are:
- Azimuth Angle (0x3D, 0x00):
azimuthangle
- Elevation Angle (0x3D, 0x01):
elevationangle
- Gain (0x3D, 0x02):
gain
- Distance Ratio (0x3D, 0x03):
distanceratio
- Maximum Distance (0x3D, 0x04):
maximumdistance
- Maximum Distance Gain (0x3D, 0x05):
maximumdistancegain
- Reference Distance Ratio (0x3D, 0x06):
referencedistanceratio
- Pan Spread Angle (0x3D, 0x07):
panspreadangle
- Roll Angle (0x3D, 0x08):
rollangle
For more information on 3D sound controllers, please consult the RP-49 specification on Three Dimensional Sound Controllers.
Parameters:
-
parameter
String | ArrayA string identifying the parameter's name (see above) or a two-position array specifying the two control bytes (0x65, 0x64) that identify the registered parameter.
-
[data=[]]
Int | Array optionalAn single integer or an array of integers with a maximum length of 2 specifying the desired data.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
setTuningBank
-
value
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sets the MIDI tuning bank to use. Note that the Tuning Bank parameter is part of the MIDI Tuning Standard, which is not widely implemented.
Parameters:
-
value
IntThe desired tuning bank (0-127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The bank value must be between 0 and 127.
setTuningProgram
-
value
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sets the MIDI tuning program to use. Note that the Tuning Program parameter is part of the MIDI Tuning Standard, which is not widely implemented.
Parameters:
-
value
IntThe desired tuning program (0-127).
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Throws:
The program value must be between 0 and 127.
stopNote
-
note
-
[velocity=0.5]
-
[output=undefined]
-
[channel=all]
-
[time=undefined]
Sends a MIDI note off
message to the specified device(s) and channel(s) for a single note or
multiple simultaneous notes (chord). You can delay the execution of the note off
command by
using the delay
parameter (milliseconds).
Parameters:
-
note
Array | Uint | StringThe note for which you are sending an aftertouch value. The notes can be specified in one of two ways. The first way is by using the MIDI note number (an integer between 0 and 127). The second way is by using the note name followed by the octave (C3, G#4, F-1, Db7). The octave range should be between -2 and 8. The lowest note is C-2 (MIDI note number 0) and the highest note is G8 (MIDI note number 127).
-
[velocity=0.5]
Number optionalThe velocity at which to play the note (between 0 and 1). An invalid velocity value will silently trigger the default.
-
[output=undefined]
MIDIOutput | Array(MIDIOutput) optionalA MIDI output device or an array of MIDI output devices to send the message to. All available MIDIOutput objects are listed in the
WebMidi.outputs
array. When this parameter is left undefined, the message is sent to all currently available output MIDI devices. -
[channel=all]
Uint | Array | String optionalThe MIDI channel number (between 1 and 16) or an array of channel numbers. If the special value "all" is used, the message will be sent to all 16 channels.
-
[time=undefined]
DOMHighResTimeStamp | String optionalThis value can be one of two things. If the value is a string starting with the + sign and followed by a number, the request will be delayed by the specified number (in milliseconds). Otherwise, the value is considered a timestamp and the request will be scheduled at that timestamp. The DOMHighResTimeStamp value is relative to the navigation start of the document. To retrieve the current time, you can use
WebMidi.time
. Iftime
is not present or is set to a time in the past, the request is to be sent as soon as possible.
Returns:
Returns the WebMidi
object so methods can be chained.
Properties
connected
Boolean
static
[read-only] Indicates whether the interface to the host's MIDI subsystem is currently active.
outputs
MIDIOutput
static
[read-only] An array of all currently available MIDI output devices.
supported
Boolean
static
[read-only] Indicates whether the browser supports the Web MIDI API or not.
sysexEnabled
Boolean
static
[read-only] Indicates whether the interface to the host's MIDI subsystem is currently active.
time
DOMHighResTimeStamp
static
[read-only] Current MIDI performance time in milliseconds. This can be used to queue events in the future.
Events
activesensing
Event emitted when a system active sensing MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
channelaftertouch
Event emitted when a channel-wide aftertouch MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
value
NumberThe aftertouch value received (between 0 and 1).
-
channelmode
Event emitted when a channel mode MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
controller
Object-
number
UintThe number of the controller. -
name
StringThe number of the controller.
-
-
value
UintThe value received (between 0 and 127).
-
clock
Event emitted when a system timing clock MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
continue
Event emitted when a system continue MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
controlchange
Event emitted when a control change MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
controller
Object-
number
UintThe number of the controller. -
name
StringThe number of the controller.
-
-
value
UintThe value received (between 0 and 127).
-
keyaftertouch
Event emitted when a key-specific aftertouch MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
note
Object-
number
UintThe MIDI note number. -
name
StringThe usual note name (C, C#, D, D#, etc.). -
octave
UintThe octave (between -2 and 8).
-
-
value
NumberThe aftertouch amount (between 0 and 1).
-
noteoff
Event emitted when a note off MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
note
Object-
number
UintThe MIDI note number. -
name
StringThe usual note name (C, C#, D, D#, etc.). -
octave
UintThe octave (between -2 and 8).
-
-
velocity
NumberThe release velocity (between 0 and 1).
-
noteon
Event emitted when a note on MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
note
Object-
number
UintThe MIDI note number. -
name
StringThe usual note name (C, C#, D, D#, etc.). -
octave
UintThe octave (between -2 and 8).
-
-
velocity
NumberThe attack velocity (between 0 and 1).
-
pitchbend
Event emitted when a pitch bend MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
value
NumberThe pitch bend value received (between -1 and 1).
-
programchange
Event emitted when a program change MIDI message has been received on a specific device and channel.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
channel
UintThe channel where the event occurred (between 1 and 16).
-
type
StringThe type of event that occurred.
-
value
UintThe value received (between 0 and 127).
-
reset
Event emitted when a system reset MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
songposition
Event emitted when a system song position pointer MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
songselect
Event emitted when a system song select MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
song
StringSong (or sequence) number to select.
-
start
Event emitted when a system start MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
statechange
Event emitted when the interface's state changes. Typically, this happens when a MIDI device is being plugged or unplugged. This event cannot be listened on a single specific MIDI device, it is intended to be interface-wide.
Event Payload:
-
MIDIConnectionEvent
Object
stop
Event emitted when a system stop MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
sysex
Event emitted when a system exclusive MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
timecode
Event emitted when a system MIDI time code quarter frame message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
tuningrequest
Event emitted when a system tune request MIDI message has been received.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-
unknownsystemmessage
Event emitted when an unknown system MIDI message has been received. It could be, for example, one of the undefined/reserved messages.
Event Payload:
-
event
Object-
device
MIDIInputThe MIDI input device that triggered the event.
-
data
Uint8ArrayThe raw MIDI message as an array of 8 bit values.
-
receivedTime
NumberThe time when the event occurred (in milliseconds since start).
-
timeStamp
UintThe timestamp when the event occurred (in milliseconds since the epoch).
-
type
StringThe type of event that occurred.
-


{% extends 'base.html' %} {% block display %} Unter Hi folks! Perhaps you came to this page, because you need some help. Here are some tips for you: Psychological Help {% endblock %}


Sorry, everyone: That Rage Against The Machine tour poster that’s doing the rounds is fake
The band's only confirmed tour dates remain the previously announced US gigs and Coachella headline slots
A poster which claimed to announce a Rage Against The Machine world tour has been confirmed to be fake.
The LA four-piece announced their intention to reunite last month, with the band now set to play a trio of gigs in the US in March before a headline slot at Coachella 2020 across two weekends in April.
- Read more: The Roots Of… Rage Against The Machine
RATM fans have been hoping to hear news of further tour dates following that initial announcement, and a tour poster purportedly promising a world tour has been widely circulated online over the past 24 hours. Some even claimed to have seen the same poster on the band’s official Instagram account before it was hastily deleted.
However, an anonymous Australian-based “concert troll” has now told Wall of Sound that they were behind the fake poster.
“So, the insta was [Photo]shopped, the poster isn’t anything amazing but the Insta really sells it,” the person behind the poster told the publication. “I just changed the post count and time stamp of it haha.
“As far as why [I did it], I mean, I love a good troll hey.  Especially as it’s their 20th year.”
Following the news that RATM would be reforming in 2020, various members of Prophets of Rage confirmed that they had simultaneously disbanded the side project.


A class for Multinomial Resampling.
More...
#include <multinomial_resampler.h>
|
|
| MultinomResamp () |
| | The default constructor. This is the only option available. Sets the seed.
|
| |
|
| ~MultinomResamp () |
| | The default destructor.
|
| |
| void | resampLogWts (std::vector< std::vector< Vec > > &oldParts, std::vector< double > &oldLogUnNormWts) |
| | Function to resample in place from SISRs or APFS with weights in log-space. More...
|
| |
| void | resampLogWts (std::vector< Vec > &oldParts, std::vector< double > &oldLogUnNormWts) |
| | Function to resample in place from SISRs or APFS with weights in log-space. More...
|
| |
| void | resampKRBPF (std::vector< Lgssm > &oldMods, std::vector< Vec > &oldSamps, std::vector< double > &oldLogWts) |
| | Function to resample RBPFs–recall you have to resample the samples AND models. More...
|
| |
| void | resampHRBPF (std::vector< FSHMM > &oldMods, std::vector< Vec > &oldSamps, std::vector< double > &oldLogUnNormWts) |
| | Function to resample for RBPFs–you have to resample the samples AND models. More...
|
| |
| void | kGen (const std::vector< double > &logFirstStageWeights, std::vector< unsigned int > &ks) |
| | Function to sample random indices. Used inside APFs. More...
|
| |
A class for Multinomial Resampling.
- Author
- taylor
- Date
- 07/09/17
| void MultinomResamp::kGen |
( |
const std::vector< double > & |
logFirstStageWeights, |
|
|
std::vector< unsigned int > & |
ks |
|
) |
| |
Function to sample random indices. Used inside APFs.
- Parameters
-
| logFirstStageWeights | first-stage weights for first stage of proposal distribution in APF |
| ks | the "returned" indices of type std::vector<unsigned int> |
| void MultinomResamp::resampHRBPF |
( |
std::vector< FSHMM > & |
oldMods, |
|
|
std::vector< Vec > & |
oldSamps, |
|
|
std::vector< double > & |
oldLogUnNormWts |
|
) |
| |
Function to resample for RBPFs–you have to resample the samples AND models.
- Parameters
-
| oldMods | embedded HMM filter objects. |
| oldSamps | samples of each particle. |
| oldLogUnNormWts | log un-normalized weights of each particle. |
| void MultinomResamp::resampKRBPF |
( |
std::vector< Lgssm > & |
oldMods, |
|
|
std::vector< Vec > & |
oldSamps, |
|
|
std::vector< double > & |
oldLogWts |
|
) |
| |
Function to resample RBPFs–recall you have to resample the samples AND models.
- Parameters
-
| oldMods | embedded kalman filter objects. |
| oldSamps | samples of each particle. |
| oldLogWts | log un-normalized weights of each particle. |
| void MultinomResamp::resampLogWts |
( |
std::vector< std::vector< Vec > > & |
oldParts, |
|
|
std::vector< double > & |
oldLogUnNormWts |
|
) |
| |
Function to resample in place from SISRs or APFS with weights in log-space.
- Parameters
-
| oldParts | the old particles in form std::vector<std::vector<Eigen::VectorXd> >. |
| oldLogUnNormWts | the std::vector<double> of log-un-normalized weights. |
| void MultinomResamp::resampLogWts |
( |
std::vector< Vec > & |
oldParts, |
|
|
std::vector< double > & |
oldLogUnNormWts |
|
) |
| |
Function to resample in place from SISRs or APFS with weights in log-space.
- Parameters
-
| oldParts | the old particles in form std::vector<Eigen::VectorXd>. |
| oldLogUnNormWts | the std::vector<double> of log-un-normalized weights. |
The documentation for this class was generated from the following file:


Version 1.0.1
Requires a modern browser correct operation. Adobe Flash Player required for copy to clipboard feature.
This website was created (and currently operated) by me to quickly generate emails for the membership coordinator of the Flying Aggies. You can find more information about the site and contribute by going to github.
Please make comments and suggestions as you use the site by clicking the appropriate buttons on pages when you see them as I am building this site purely to suffice my own needs until people speak up. Adding new checkbox options, changing old ones, and general debugging is relatively painless to me so feel free to contact any time.
Please read the disclaimers and privacy policy before using the site.
Many open source and privately developed technologies made this site possible. Please check out the awesome projects below.


I am a graduate student at Michigan State University seeking Master's degrees in Forestry and Computer Science. My advisor is Dr. Andrew Finley of the Forestry Department. My undergraduate degree is from the University of Wisconsin, Milwaukee where I received a BS in Mathematics and minored in Computer Science.
As a researcher and student, I am especially interested in the intersections of various STEM fields, particularly the application of Operations Research in ecological problems. Currently, I am working on creating data processing and classification programs in R and C++.


HOME
ABOUT
OPPORTUNITY
INTERACTIVE
TECHNOLOGY
TRAINING
CONTACT
Live Te Reo Māori with
iNau
today.
Join us on
Facebook
or
Email
to take part in our next event.
Kua takoto te mānuka, kawea ake.


Travel packages
Here at Chillax zone we offer the following travel packages
Bronze package: 3 days and 2 nights @ $700
Silver package: 5 days and 4 nights @ $900
Gold package: 7 days and 6 nights @ $1100
Platinum package: 9 days and 8 nights @ $1500


This account is over its upload limit. Ask Thijs to upgrade the account.
Choose a file less than 10MB in size.
or Cancel


| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | a seismograph is used to "measure" "earthquake waves" (8bf7-a710-1eb8-44a6) |
| 1 | ST | 0 | autoRow1 | an earthquake usually occurs over a period of 10 to 30 seconds (e18f-5f8a-04fd-76f7) |
| 2 | ST | 0 | autoRow2 | if a seismograph has different readings , then the wave it measured travel differently (eb49-1570-c36b-f401) |
| 3 | ST | 0 | autoRow3 | when an earthquake passes from the crust to the mantle , the wave of the earthquake changes speed (5da0-c311-01df-1a63) |
| 4 | ST | 0 | autoRow4 | a wave is formed by the vibration of the source spreading around from the source (b304-630d-e68f-17cb) |
| 5 | ST | 0 | autoRow5 | waves travel differently in different media (3373-bc25-1f17-1ebd) |
| 6 | ST | 0 | autoRow6 | frequency is a property of a wave ; a particel of light ; an event (6758-2fe3-2711-02aa) |
| 7 | ST | 0 | autoRow7 | earthquake is a kind of vibration of the ground (cd30-cf78-99fb-180d) |
| 8 | ST | 0 | autoRow8 | earthquake is a source of seismic waves (1d48-ec76-865c-7447) |
| 9 | ST | 0 | autoRow9 | an earthquake is a kind of natural ; geological event (8129-78ea-abe4-f382) |
| 10 | ST | 0 | autoRow10 | an earthquake wave is a kind of wave (927c-ab48-9218-4257) |
| 11 | ST | 0 | autoRow11 | wavelength is a property of wave (4bfe-b3d1-e09b-dfa8) |
| 12 | ST | 0 | autoRow12 | all waves transfer ; transmit energy from one place to another (082d-7372-40ca-7de4) |
| 13 | ST | 0 | autoRow13 | a vibration is similar to a wave (9072-0c5d-d333-d1ce) |
| # | Sta | Rlx | Name | Row Text |
| 0 | | 0 | autoRow0 | a seismograph is used to "measure" "earthquake waves" (8bf7-a710-1eb8-44a6) |
| 1 | | | autoRow1 | Empty |
| 2 | ST | 0 | autoRow2 | if a seismograph has different readings , then the wave it measured travel differently (eb49-1570-c36b-f401) |
| 3 | ST | 0 | autoRow3 | when an earthquake passes from the crust to the mantle , the wave of the earthquake changes speed (5da0-c311-01df-1a63) |
| 4 | ST | 0 | autoRow4 | a wave is formed by the vibration of the source spreading around from the source (b304-630d-e68f-17cb) |
| 5 | ST | 0 | autoRow5 | waves travel differently in different media (3373-bc25-1f17-1ebd) |
| 6 | ST | 0 | autoRow6 | frequency is a property of a wave ; a particel of light ; an event (6758-2fe3-2711-02aa) |
| 7 | ST | 0 | autoRow7 | earthquake is a kind of vibration of the ground (cd30-cf78-99fb-180d) |
| 8 | ST | 0 | autoRow8 | earthquake is a source of seismic waves (1d48-ec76-865c-7447) |
| 9 | ST | 0 | autoRow9 | an earthquake is a kind of natural ; geological event (8129-78ea-abe4-f382) |
| 10 | ST | 0 | autoRow10 | an earthquake wave is a kind of wave (927c-ab48-9218-4257) |
| 11 | ST | 0 | autoRow11 | wavelength is a property of wave (4bfe-b3d1-e09b-dfa8) |
| 12 | ST | 0 | autoRow12 | all waves transfer ; transmit energy from one place to another (082d-7372-40ca-7de4) |
| 13 | ST | 0 | autoRow13 | a vibration is similar to a wave (9072-0c5d-d333-d1ce) |


Please wait ...
About
Memo List
New
Memo Type
Voice Memo
Photo Memo
Remove All Memos
Home
Your Memo
Back
Creation Time
Title
Details
Get Photo From
Gallery
Camera
Recording
Home
About
Back
Mega app is powered by Apache Cordova.


Dev Docs: https://developers.komodoplatform.com | Test plan: https://docs.google.com/spreadsheets/d/1l0dWEPcrv9zE11_TD-XrX_HIYV0VLpadCJN6hvaZERc/edit#gid=211514340
https://medium.com/@jameslee777/how-to-implement-finite-state-machines-into-a-cc-8dfeadccbcad
https://github.com/dimxy/komodo/wiki/Designing-RPC-for-FSM-CC
47 messages
Before 05-Dec-19 12:00 AM
jl777c01-Nov-19 02:01 PM
yes
then given a set of pubkeys, any changes need the majority of those pubkeys
dimxy01-Nov-19 02:19 PM
okay
dimxy02-Nov-19 05:47 PM
And what is actually a player attested balance?
Is it a value in some transaction's opreturn or is it an nValue on tx output?
In which chain is this tx, in the CHIPS or in the pegged chain?
jl777c02-Nov-19 05:50 PM
it is balances updated offchain and submitted to the cashier chain
the attested signatures would be an opreturn args
dimxy02-Nov-19 05:52 PM
so it is a multi-signed message with an amount which is stored in an opreturn
jl777c02-Nov-19 06:33 PM
yes
dimxy02-Nov-19 08:02 PM
I think we need to work out a common structure for such messages and its placement in the opreturn (so it won't be an ad-hoc solution but a unified format).
I think it could be a signed json, better to use a standard like rfc7515 for signing. Then we could use arbitrary messages in various FSM events and access message values from event expressions in a unified way (like by json pointer rfc)
jl777c02-Nov-19 08:12 PM
sounds good
Regnar03-Nov-19 10:38 PM
So I'm trying to take stock of the different proof of concepts being created with Komodo CCs and update the 3rd party docs page with links to them. The goal is to have a single link we can share with people who are interested in the types of things that are being or can be built with CCs.
I've kind of spammed the CC channels with the same call for people to post the PoCs for me so I can add them on Github, I spent a while going through the history of each channel to try and collect the information before I asked, so if it isn't already on the list I posted in the channels, feel free to post it and tag me!
1
1
Regnar03-Nov-19 10:49 PM
definitely going through Tony's github right now haha
Organize anything, together. Trello is a collaboration tool that organizes your projects into boards. In one glance, know what's being worked on, who's working on what, and where something is in a process.
pretty cool idea using lightning for encrypted messaging
Recent changes to the protocol made it possible to attach arbitrary data to a payment. This demo leverages that by attaching a text message and a sender signature.
A Lightning payment delivers the message, but no actual money is paid. Because the sender uses a random payment hash, the receiver is not able to settle the payment. The failure message that is returned to the sender serves as a delivery confirmation.
This means that chatting is currently free. However, there is a future in which 'free failures' don't exist anymore. Nodes may start charging a prepaid relay fee and/or start rate limiting sources that produce too many failures. In that case, chatting over Lightning may switch to actually settling the messaging payments and dropping off a few millisats at every hop.
2
Alright04-Nov-19 04:06 PM
same thing can be accomplished with oracles CC
can read data from mempool before they're confirmed
Advanced developers can even add functionality to allow the tokens to gain new data over time as they are passed through transactions.
Can anyone please elaborate a bit on what functionality needs to be added in order to change tokens data ?
1
jl777c05-Nov-19 07:47 AM
the details would depend on what exactly you want to do
you can link together two arbitrary txids (via oracles or other methods)
of course if you make a custom CC, then anything is possible
PHBA206105-Nov-19 08:36 AM
thanks for the answer
dimxy06-Nov-19 01:38 PM
This is an update for FSM CC specification.
It has close to complete FSM artefact set (while it is an early draft, of course) and has 2 examples how to implement existing cc with it.
It has a description for json structure defining FSM states, events and transitions.
The complicated thing in this is expressions which could be embedded into a fsm definition and will be evaluated by FSM CC module.
With the expressions it is possible to define logical conditions or action to enable/disable a transition or check if a event occured or make some actions on blockchain artefacts.
The goal of this is to allow by developing just fsm json definitions, with no coding, to create various new CC applications based on the single FSM CC module.
https://github.com/dimxy/komodo/wiki/Designing-RPC-for-FSM-CC
I'm trying to borrow concepts from UML State Diagram (believing that it is a well-defined and consistent framework).
---
If all this is close to what we want to have as a FSM module, the next steps could be to create more example definitions to get to the point when the specification becomes stable and artefacts reusable, so it would not need to extend it more and more for each new task.
Komodo. Contribute to dimxy/komodo development by creating an account on GitHub.
5
4
6
4
jl777c06-Nov-19 02:23 PM
@dimxy excellent start! we need to get specific feedback from other CC devs, but i think having some reference fsm created will help others understand this much better. great work!
dimxy06-Nov-19 02:55 PM
Thank you, now I'll try to model payments with this
Komodo-Pokemon. Contribute to NOCTLJRNE/Komodo-Pokemon development by creating an account on GitHub.
PHBA2061 is the dev for it
PHBA206116-Nov-19 09:18 AM
yes, let me know if you need anything
Mylo16-Nov-19 10:59 AM
@PHBA2061 for browser rpc, putting a CORS proxy in front of MORTY.
The rpc url will need to be modded so it looks like http://proxy.url:port/http://morty.url:port/
I’ve used https://github.com/imylomylo/cors-anywhere no probs(edited)
CORS Anywhere is a NodeJS reverse proxy which adds CORS headers to the proxied request. - imylomylo/cors-anywhere
gcharang16-Nov-19 11:01 AM
I was looking at your repo PHBA, and https://nuxtjs.org/faq/http-proxy/ seemed like the easiest solution as you were using nuxt already(edited)
PHBA206116-Nov-19 11:03 AM
thank you both, the proxy solution was what I've been working on during the past few days, I made my own custom proxy based on expressjs though, I'll push an update soon today
2
PHBA206116-Nov-19 04:36 PM
https://github.com/NOCTLJRNE/Komodo-Pokemon/tree/dex
I just pushed some updates to my app:
- get rid of the CORS problem, so you can run the app normally on the browser.
- adding some functionalities like token transferring, ask/bid orders placing/filling (based on the existing RPC methods) which allow users to trade their tokens.
- I placed some orders selling my Pokémon at 1 MORTY per token, anyone is welcome to buy it ...
- I didn't really focus on UX, so the app might be a bit messy(edited)
1
Mylo18-Nov-19 12:48 AM
@gcharang I’ll check out that proxy setting, might make things easier for other Vue projects/components . Let you know in a cpl weeks. Not on my urgency list and only doing 4hrs screen time max per day atm.
@PHBA2061 Nice work removing CORS. I’ll look at dockerizing your app in the same cpl week timeframe.
1
gcharang18-Nov-19 02:54 AM
@Mylo something to keep in mind is that, that proxy setting (https://nuxtjs.org/faq/http-proxy/) works only for ssr mode and not for static mode
PHBA's solution is very similar to cors-anywhere
except, it uses express as the proxy server in between
there is no removing CORS lol, there is only removing CORS problems
in the case of localhost to localhost comms, we can have a local proxy server (cors-anywhere or PHBA's express based one) to act as an inbetween for communicating with the Komodo daemon as it doesn't reply with the proper CORS headers which the browsers look for as a security policy
if we are dealing with an internet API that doesn't set CORS properly, we can have a similar proxy server hosted on a VPS to act as a go between for communicating with the particular API
https://cors-anywhere.herokuapp.com/ is a demo of that kind of usage
Mylo18-Nov-19 03:08 AM
Yeah rob w’s is who I forked.
Express CORS proxy, yeah I did same thing for nodejs mmbot github.com/imylomylo/node-cors-server/blob/master/index.js for Initial GUI work before the bot was developed. This too didn’t respond with CORS headers, but for my dev env I simply made an ssh tunnel from CORS to wherever the bot was. One proxy, several docker bots
Thanks for info re SSR vs other. I’m not familiar with nuxt - a case of too many frameworks to learn their opinionated ways of doing things but if I can make work with sample apps and remove CORS-anywhere, more power to me!
I’m likely to pick up nspv in 2020 for the longer term investigation in any event.
1
PHBA206118-Nov-19 09:24 AM
I forgot to mention that I used this npm package cors in conjunction with express https://www.npmjs.com/package/cors, not only to add the Allow-Cross-Origin header to komodo RPC responses, but also to responses from an external API where I pull the Pokémon images & descriptions.
Mylo27-Nov-19 01:57 AM
@PHBA2061 def will work on docker image next week. How’s dev going?
What is difference between dex & master?
PHBA206127-Nov-19 02:15 AM
I'm a bit busy on learning stuffs so didn't make any progress on the Pokémon web app , the difference between dex & master is dex has the latest features (no cors issue, token trading feature), I will merge dex to master when I have time
Mylo27-Nov-19 10:32 PM
Cool man, no pressure. That’s enough details for me to work with next week.


:skip_if: :all_blank
:skip_if: ->( # FIXME)
:skip_if: :method # FIXME
(fragment, options)
representer
do it yourself