Clapping, dancing and snapping one’s finger on Shabbos:
Clapping: One may not clap his hands against each other or on his lap in a regular fashion, whether out of joy, even for marriage, or whether out of mourning. However it is permitted to clap in an irregular fashion.
Snapping one’s finger: One may not play a tone through snapping his fingers against each other or against another item.
Dancing: It is likewise forbidden to dance for this reason even by a wedding, however on Simchas Torah it is permitted to dance while singing praise for the Torah, as this is in honor of the Torah.
The reason for the all the above restrictions: All of these matters and the like of them are forbidden due to a decree that one may come to fix himself a musical instrument to sing or lament with.
The custom to be lenient: Now that the populace is accustomed to clap and stamp and dance [without an irregularity] by all forms of joyous occasions, one is to not protest their actions as it is for certain that they will not listen, and it is better that they be negligent transgressors then be advertent transgressors. [However] there are those which have learned merit for them [that it be allowed to clap and dance] being that we are no longer expert in musical instruments, and it is thus not relevant to decree that perhaps one will come to make himself a musical instrument, as it is a completely uncommon occurrence. [It is possibly due to this that the custom has become to be lenient in all the above.]
Whistling: It is permitted to sing or whistle on Shabbos.
Thumb snapping: One may not snap his thumb in rhythm of a tune.
Clapping and Dancing: It is disputed if one may dance and clap in the regular way done during the week. One is to be stringent and avoid doing so, although those which are lenient are not to be protested. [Practically today we are lenient regarding dancing and clapping on behalf of Simchas Shabbos and Yom Tov, although not in other scenarios.] According to all one may clap with an irregularity.
May one whistle through placing his fingers in his mouth?
May one snap his fingers in order to wake someone up or get their attention?
May one clap in order to wake someone up or to get their attention? 
May one clap after a speech?
Dancing and clapping for purposes of a Mitzvah
Dancing and clapping on Simchas Torah:
According to all it is permitted to dance and clap on Simchas Torah when the praises of Torah are read.
May one ring bells on Simchas Torah?
No. One may not make noise with any instrument.
May one dance and clap for a Mitzvah purpose?
Those which are lenient to do so need not be discouraged.
May one dance and clap to a Niggun on Shabbos and Yom Tov?
May one drum his hands or a vessel on the table in beat of a song or Niggun?
From the letter of the law this is forbidden. However the custom is to allow drumming out of joy when singing a Niggun. Nevertheless seemingly one is not to drum using a vessel but rather only with his hands.
 As the entire decree is only applicable when one does an action with an item to make musical tones, as then there is room to suspect one may come to fix an instrument. This however does not apply when doing so merely with one’s mouth. [ibid]
 This ruling of Admur follows the ruling of Rama.
Other Opinions: The Aruch Hashulchan 339/9 argues that the form of clapping and dancing done today was never included in the original decree of the Sages and hence it is always permitted to be done on Shabbos.
 Rama 339/3; “All the above” means clapping and dancing, however ringing bells and other forms of music mentioned here are not allowed even according to the custom. [M”B 339/10]
 Other Opinions: The Aruch Hashulchan 339/9 argues that the form of clapping and dancing done today was never included in the original decree of the Sages and hence it is always permitted to be done on Shabbos and is not subject to dispute.
 See Q&A below
 Aruch Hashulchan 338/7. However see Mishneh Halachos 4/52 which negates the reasoning of the Aruch Hashulchan.
 M”B 339/9; Biur Halacha “Oi Al Haluach”.
 As only when these noises are made in a way of music were they forbidden. [So is implied from Admur that mentions by clapping “out of joy or mourning”.]
 Tosefes Shabbos; Peri Megadim brought in M”B ibid
 Based on M”B 339/9
 As only when these noises are made in a way of music were they forbidden. [So is implied from M”A/Admur that mentions by snapping “as do the singers”.]
 Az Nidbaru 13/14
 As one has no intent to make music. [ibid]
 Admur 339/2; M”A 669/1 in name of Darkei Moshe and Mahrik; M”B 339/8
 M”B 339/8
 M”B 339/10
 The Rashal rules that in a case of a Mitzvah one may even initially rely on the opinion brought above that today the decree no longer applies. [Shaareiy Tziyon 339/7] From Admur however it is implied that he rules that even for the need of a Mitzvah it is forbidden [Nessuin]. Nevertheless it is the custom today to be lenient like this opinion.
 Minchas Elazar 1/29; Nimukei Orach Chayim 339; Ashel Avraham [Butshatsh]; Shaareiy Halacha Uminhag 2/165; M”B 339/10 that for a Mitzvah purpose no need discourage those which are lenient.
Aruch Hashulchan 339/9 rules that the form of clapping and dancing done today was never included in the original decree of the Sages and hence it is always permitted to be done on Shabbos even not for a Mitzvah purpose. He learns this from the fact dancing was allowed on Simchas Torah and it is difficult to say we would nullify a Rabbinical prohibition for the sake of Simchas Torah. Hence he concludes that in truth it is allowed. To note however that even according to our custom to allow dancing and clapping for Simcha on Shabbos and Yom Tov this is only because it is for the need of a Mitzvah, as is explained in Minchas Elazar ibid. However for a non-Mitzvah purpose we would still hold by the original prohibition, unlike the Aruch Hashulchan.
 As all have accepted the allowance to dance and clap on Simchas Torah, and there is no reason to differentiate between Simchas Torah and Shabbos or other Holidays. [ibid]
 Shaareiy Halacha Uminhag ibid.
 Az Nidbaru 13/14
 As explained above regarding clapping and dancing to a Niggun.
 Piskeiy Teshuvos 339 footnote 4